Neymar was the star of the show for Brazil again, scoring two goals as the hosts beat Cameroon to top Group A.
The striker sidefooted home Luiz Gustavo’s cross for the opener but Cameroon, who had already been eliminated, equalised when Joel Matip tapped in from close range.
Neymar fired in a low drive from the edge of the box to restore Brazil’s lead before Fred headed in David Luiz’s cross and Fernandinho added a fourth, reports the BBC.
Brazil will play Chile in the last-16.
And in the second game, Mexico booked a last-16 World Cup tie against Netherlands after knocking out Croatia.
A win would have seen Croatia progress and they survived a scare when a Hector Herrera strike hit the crossbar.
But Rafael Marquez headed in for Mexico before Andres Guardado drove in a shot and Javier Hernandez nodded home to put them 3-0 up.
Ivan Perisic scored for Croatia, whose misery was compounded when Mateo Kovacic was sent off late on.
Australia 0 – 3 Spain
Netherlands 2 – 0 Chile
Cameroon 1 – 4 Brazil
Croatia 1 – 3 Mexico