Neymar’s brace helped Brazil see off Cameroon and advance into the last-16 of the World Cup on Monday.
The Barcelona’s forward came up with two brilliant first-half goals either side of Joel Matip’s leveler in Brasilia.
Fred and Fernadinho completed a 4-1 win over the ‘Indomitable Lions’, who were without injured inspirational captain Samuel Eto’O and the suspended Alexandre Song.
Brazil finished the preliminary round as winners of Group A, while Mexico- 3-1 victors over Croatia- claim the runners-up slot.
The hosts will meet Group B runners-ups Chile in the quarter-finals scheduled for Saturday in Belo Horizonte.
Brazil claimed the ascendancy when Neymar received a Luis Gustavo cross from the left, the 22-year-old opened his body to beat Charles Itandje with a fascinating one-time, side-footed shot into the bottom corner.
Neymar’s opener- the 100th goal of this World Cup- got the partisan crowd at Arena Sao Paulo rocking and bubbling.
Cameroon exposed coach Luiz Felipe Scolari’s side’s inconsistent defence, as Allan Nyom dribbled Dani Alves before squaring for Matip to escape Luiz and finish from close range.
Marcelo then found Neymar with a clever pass to race upfield and wrong-foot Itandje.
Second-half substitute Fernandinho then sent Hulk clear; the latter found Luiz to cross to Fred, who made no mistake but to add a third goal for Brazil- replay suggested he was offside.
Manchehster City midfielder Fernandinho capped his brilliant display with a superb fourth goal in the closing minutes of the game.
Croatia 1-2 Mexico
Mexico will face Group B winners the Netherlands after a vibrant display against Croatia.
Croatia needed a win to progress to the second round of the tournament, but it was the ‘El Tricolor’ that showed determination right from the blast of the whistle.
A Hector Herrera strike hit the crossbar, before Rafael Marquez headed in for Mexico and Andres Guardado added a second.
Javier Hernandez’s header put Mexico 3-0 up, and Ivan Perisic scored a late consolation for Croatia.
Croatia were reduced to ten men when Ante Rebic got his marching orders for a rough tackle on Carlos Pena late on.
A draw would have done the trick for coach Miguel Herrera’s side, but Mexico left no stone unturned on their route to a seventh knock-out stage appearance in the last eight tournaments.
Niko Kovac’s Croatia have now been eliminated in four of their last five major tournaments.