Two goals from man-of-the-match Aruna Dindane and a late penalty from substitute Bonaventure Kalou saw the Ivory Coast come from two goals down to end their first World Cup campaign with an impressive, if futile, win.
Early goals from giant striker Nikola Zigic and Sasa Ilic, both the result of poor defending, put Serbia and Montenegro firmly in control in what could be their last match before the country splits into two nations.
However, Dindane's penalty, following a handball bordering on the ridiculous by Milan Dudic, allowed the African side back into the match while Serbia and Montenegro were then reduced to 10 men before the break by the sending off of substitute Albert Nadj.
Dindane's second-half header then evened things up and then, when Dudic handled again, another penalty was awarded although Dindane spurned the chance of the first 2006 World Cup hat-trick by allowing Kalou to score the penalty.
"Let's say I was satisfied because we won our first match and that required a lot of effort but we still ran up against the same problems," said Ivory Coast coach Henri Michel - who also confirmed he will leave the post to take a coaching job with an unnamed club in Qatar.
"Again we conceded two goals in 20 minutes which made things very complicated for us. At this level that's not good enough and if the Ivory Coast wants to be competitive at this level we must sort out this sort of problem."
Serbia and Montenegro coach Ilija Petkovic said, "The Ivory Coast played better than us and we have to acknowledge that."
There was nothing to play for but pride for both teams with Argentina and Holland having already secured the two Group C qualification berths on offer, although 66,000 spectators still watched a match which saw both teams have a man sent off - Ivory Coast's Cyrille Domoraud received his marching orders in stoppage time.
After nine minutes the Serbo-Montenegrins took the lead as a long ball from Dejan Stankovic caught out the leaden-footed Ivorian defence, leaving 6ft 8in Zigic to round goalkeeper Boubacar Barry and score.
The Ivorians, deprived of the suspended Didier Drogba, should have equalised when Kader Keita dashed down the right and crossed to Dindane but his shot was blocked by goalkeeper Dragoslav Jevric with his feet before Kanga Akale missed the rebound with the goal at his mercy.
Serbia and Montenegro took full advantage as they went 2-0 ahead after 20 minutes. Predrag Djordjevic's ball was miscontrolled by Domoraud and Ilic took the ball past Barry and netted.
Dudic's comical 37th-minute handball - even he was giggling as he was cautioned - gave the Africans a way back with Dindane netting from the spot twice after being made to retake it by Mexican referee Marco Rodriguez for encroachment.
Dindane was later harshly booked for diving for what should have been a penalty when Jevric upended him but then Ilija Petkovic's side were reduced to 10 men when Nadj got his second yellow card.
Early in the second half Akale's shot forced Jevric to save with his feet as Henri Michel's team tried to make the extra man pay and then Arouna Kone fired just wide. Blaise Kouassi's long-range effort rattled the crossbar as the Ivorians poured forward.
Dindane netted the equaliser with a header after connecting with a cross from Keita.
Then came Dudic's second handball and Dindane's generosity allowed Kalou to ensure the Elephants signed off a win.
Ivory Coast (4-4-2): Barry (Beveren); Eboué (Arsenal), Kouassi (Troyes), Domoraud (Creteil), Boka (Strasbourg); Akale (Auxerre), Zokora (St Etienne), Keita (Lille), YY Touré (Olympiakos); A Kone (PSV Eindhoven), Dindane (Lens). Substitutes used: B Kone (Nice) for Akale, 60; Kalou (Paris St-Germain) for Keta, 73.
Serbia & Montenegro (4-5-1): Jevric (Ankaraspor); Gavrancic (Dynamo Keiv), N Djordjevic (Partizan Belgrade), Dudic (Red Star Belgrade), Krstajic (Schalke 04); Ergic (Basle), Duljaj (Shakhtar Donetsk), Stankovic (Internazionale), P Djordjevic (Olympiakos) Ilic (Galatasaray); Zigic (Red Star Belgrade). Substitutes used: Nadj (Partizan Belgrade) for Krstajic, 16; Milosevic (Osasuna) for Zigic, 67.
Booked: Ivory Coast Keita, Dindane, Domoraud; Serbia & Montenegro Dudic, Nadj, Duljaj, Gavrancic.
Sent off: Ivory Coast Domoraud (90); Serbia & Montenegro Nadj (45).
Referee: M Rodriguez (Mexico).Reuse content