Brazil booked their place in the knockout stages of South Africa 2010 with a comfortable victory over the Cote d'Ivoire, but their joy was tempered by the dismissal of midfielder Kaka.
Luis Fabiano scored twice before former Manchester City midfielder Elano put the result beyond doubt.
Yet there was still time for Didier Drogba to head home a consolation goal for the Les Elephants in the 79th minute.
Meanwhile, Kaka was sent off with two minutes to go for an off the ball incident with Kader Keita although TV replays showed minimal amount of contact.
Brazil manager Dunga kept his faith in the same starting line-up that faced Korea DPR in their opening match in Group G.
The South Americans struggled in that match, with Real Madrid attacker Kaka in particular finding it difficult to make his mark on the tournament.
Nevertheless, the five-time winners managed to grind out a 2-1 victory to get their campaign off to a winning start.
But while Brazil were largely unimpressive, the Cote d'Ivoire gave a good account of themselves against Portugal in their first match in South Africa 2010.
Sven-Goran Eriksson's team earned a respectable 0-0 draw, despite only having influential striker Drogba on the pitch for the final 25 minutes.
But the Chelsea striker was handed a starting berth in Soccer City, 16 days after breaking his elbow in a friendly match against Japan.
Drogba was shouldering the hopes of a nation but unfortunately for him, Brazil's defenders were more than equal to his attacking threat and as time elapsed, his frustration became evident.
He would have been more incensed to see Brazil take a 25th minute lead yet also had admiration for the strike itself.
After some patient build up play, Kaka fed Fabiano and the Sevilla man slammed the ball into the top corner from close range.
It was an excellent finish from the striker to end his nine month goal drought for the national side.
The Sevilla striker added his second in the 50th minute when he showed excellent skill to beat three defenders before slotting past goalkeeper Boubacar Barry.
Elano made it three-nil in the 62nd minute after converting from Kaka's sweeping pass as their opponents crumbled.
But it proved to be Elano's last contribution as he was hurt in a tackle with Cheick Tiote.
Drogba scored late on with a header from Yaya Toure's incisive pass to give the African side a fighting chance.
But Brazil's night was ruined with Kaka was booked for a second time for a debatable clash with Keita.
Nevertheless, the three points were still enough to take Brazil into the knockout stages where they join the Netherlands in the last 16.
Teams: Brazil (4-2-3-1): Cesar; Maicon, Lucio, Juan, Bastos; Melo, Silva; Elano (Alves 67), Kaka, Robinho; Fabiano.
Subs (not used): Gomes, Doni, Luisao, Ramires, Thiago Silva, Gilberto, Nilmar, Josue, Julio Baptista, Kleberson, Grafite.
Ivory Coast (4-3-3): Barry; Demel, K.Toure, Zokora, Tiene; Eboue (Romaric 72), Y.Toure, Tiote; Dindane (Gervinho 54), Drogba, Kalou (Keita 68).
Subs (not used): Angoua, Boka, Gohouri, Doumbia, Gosso, Kouamatien, Zogbo, Yeboah, Bamba.