The only downside for Brazil was a yellow card for Casemiro, the influential midfielder’s second of the tournament and one which will rule him out of the quarter-final.

Mexico were without the suspended Hector Moreno and their response was to draft in Rafel Marquez, the 39-year-old defender becoming the oldest outfield player to start a World Cup knockout match since England’s Stanley Matthews in 1954.

And Mexico started impressively, with Carlos Vela and Hirving Lozano probing down the flanks and getting the better of their markers.

But it was Neymar who got the decisive touch for his second goal of the tournament.

The brilliance of Ochoa stopped Paulinho and Willian extending Brazil’s lead and Mexico were fortunate that substitute Miguel Layun was not sent off when he appeared to stamp on Neymar’s ankle, although the striker’s reaction was exaggerated in the extreme.

There was no referral of the incident to the Video Assistant Referee, but it did not matter as Firmino finished off Mexican hopes.