Brazil set up a last-16 showdown with Chile after beating Cameroon 4-1 to top Group A Monday, while Mexico defeated Croatia 3-1 to finish second and book a clash with Group B leaders the Netherlands.
Neymar scored twice in the first half to take the lead in the Golden Boot award with four goals, reports Xinhua.
He opened the scoring in the 17th minute but Joel Matip equalised in the 26th minute. Neymar put the host ahead again in the 34th before Fred and Fernandinho both scored to seal the victory.
Mexico needed only a draw to go through but Croatia had to win the battle to qualify. Mexico secured their passage after 3-0 quick-fire goals.
Rafael Marquez headed in for Mexico before Andres Guardado drove in a shot and Javier Hernandez nodded home to put them 3-0 ahead.
Ivan Perisic scored a consolation goal in the 87th minute.
The Netherlands topped Group B with a 2-0 win over Chile with two goals from substitutes Leroy Fer and Memphis Depay.
Fer’s first touch of the game was a goal. His header in the box went straight into the back of the net in the 77th minute.
In injury time, Depay sealed the win for the Dutch with a tuck-in on a brilliant pass made by captain Arjen Robben from the left.
Both having advanced to the World Cup knockout stage, the Netherlands and Chile went head-to-head for Group B winners and the Dutchmen had the last laugh.
In the other Group B match, having only pride to play for, defending champions Spain defeated Australia 3-0 to bring to an end their World Cup campaign.
David Villa, Fernando Torres and Juan Mata scored for Spain.
It was a dominating match for Spain, who had 56 percent possession.
Spain finished third with the three points the Netherlands topped the group with nine and Chile finished with six points.
“This Spanish team has a bright future no matter who will become the next coach,” said Spain head coach Vicente del Bosque.
“There are plenty of young talents in the team.”
The Australians finished their first pointless World Cup, but the performance of veteran duo Tim Cahill and Mark Bresciano was impressive enough for TVs and newspapers.