Neymar scored a brilliant brace as Brazil beat Cameroon 4-1 here yesterday to secure top spot in World Cup Group A and a last-16 tie against Chile.
The Barcelona forward scored the 100th goal of the tournament in Brazil's 100th World Cup finals match to put the hosts ahead in the 17th minute. He restored their lead before the interval after Joel Matip had equalised for Cameroon.
Fred got Brazil's third early in the second half with substitute Fernandinho adding a late fourth.
Brazil's win, combined with Mexico's 3-1 victory against Croatia in the other Group A game in Recife, ensured that they progress as group winners, ahead of Mexico on goal difference.
Brazil were much stronger, but head into Saturday's game against Chile in Belo Horizonte knowing that they can still improve.
Cameroon were already out of the tournament after losing their opening two matches, but the Indomitable Lions had the advantage of playing without any pressure.
Volker Finke's men passed the ball confidently early on and Vincent Aboubakar gave the hosts something to think about with a shot that was blocked by Marcelo, but it was Brazil who took the lead.
The opening goal came as a huge release for Brazil and their fans in the crowd of over 69,000. Neymar's coolly sidefooted into the far corner of the net first-time from a low Luiz Gustavo cross.
However, the goal owed as much to the industry and craft of Luiz Gustavo, who did superbly to rob possession from Benjamin Moukandjo on the left before delivering a pinpoint ball.
It was the first time in the tournament that Scolari's side had scored the first goal of a game, and both Neymar and Fred came close to increasing their advantage, the latter lunging desperately to connect with a Paulinho cross but unable to scramble the ball home.
Instead, Cameroon silenced the home fans when they drew level in the 26th minute. Allan Nyom got away from Dani Alves on the left and delivered a low ball that evaded Thiago Silva and David Luiz to give Matip the easiest of finishes. The Schalke player recorded Cameroon's first goal at this World Cup.
Brazil did not panic, and Neymar again intervened to restore their lead in the 34th minute. When Nyom's headed clearance was returned by Marcelo, the Barcelona player collected possession and cut inside before sending in a low shot from the edge of the area that passed underneath Nicolas Nkoulou and went right through Charles Itandje in goal.
Scolari replaced Paulinho at the interval, sending on Fernandinho, and the Manchester City midfielder had an immediate impact, helping Brazil open up a two-goal cushion four minutes into the second period.
His pass released David Luiz on the left-hand edge of the area and the latter's centre was headed into a gaping goal from four yards by the grateful Fred, who scored his first goal of the finals.
The striker may just have been in an off-side position when the cross came in, but the Swedish assistant referee did not raise his flag, much to Cameroon's frustration and Fred's relief.
Neymar was withdrawn for the closing stages and watched as Fernandinho poked home the fourth goal in the 84th minute, having combined superbly with Fred and Oscar after Cameroon lost possession in their own half.