Mexico book place in last 16
Mexico booked their place in the last 16 of the World Cup and ended Croatia's hopes of progressing from Group A with a 3-1 win in Recife.
Three goals in 11 second-half minutes from captain Rafael Marquez, Andres Guardado and substitute Javier Hernandez ensured Mexico finished second in the group and set up a meeting with the Netherlands in Fortaleza in the knockout stages on Sunday.
Croatia grabbed a consolation three minutes from time, becoming the first team to score against Mexico when Ivan Rakitic's backheel pass found the run into the box of Ivan Perisic who drilled a left-footed shot into the corner of the net past Mexico keeper Guillermo Ochoa.
But Croatia's misery was compounded a minute from time when substitute Ante Rebic was sent off for a lunge on Mexico substitute Carlos Pena.
Croatia, knowing they needed to win to progress, started the brighter of the two sides and Perisic fired a volley over the top after getting on the end of Rakitic's cross .
Perisic had another opening for Croatia on 13 minutes when he broke down the right from Rakitic's pass, but instead of shooting, he tried to cross for Ivica Olic and Marquez got back to clear the danger for a corner.
From the resulting corner, Paul Aguilar made a vital headed clearance to prevent Mario Mandzukic getting on the end of Olic's header across the face of goal to deny Croatia the lead.
Mexico were inches away from breaking the deadlock on 16 minutes when Hector Herrera played a one-two with Oribe Peralta before smashing his left-footed shot from 25 yards out against the crossbar, with Stipe Pletikosa well beaten in the Croatia goal.
Peralta wasted a great opportunity three minutes later when he got behind the Croatia defence to go clear on goal, but just when he was about to shoot, he lost his footing and slipped and the chance came to nothing.
Mexico captain Marquez was booked five minutes before the break for a cynical tackle on Perisic as Croatia tried to catch Mexico on the break and from the resulting free-kick, Darijo Srna hit his effort well over the top.
Croatia continued to push and probe at the start of the second half as they went in search of the crucial breakthrough but despite having a lot of possession, they struggled to create any clear goalscoring opportunities.
Mexico had strong claims for a penalty waved away on 64 minutes when Guardado's shot inside the box appeared to strike Srna's hand but much to the annoyance of the Mexico players and coaching team, referee Ravshan Irmatov only awarded a corner.
From the resulting set-piece, Vedran Corluka came to Croatia's rescue as he showed great awareness to get back and head the inswinging cross off the line.
Mexico continued to push forward in search of a goal and Aguilar burst into the box only to see his shot kept out by the feet of Pletikosa.
Mexico finally made the breakthrough on 72 minutes when Marquez rose above Corluka to head powerfully past Pletikosa, who got on a hand on the header but could not keep it out
Three minutes later, Mexico doubled their lead and put the game beyond Croatia as Peralta picked out Guardado inside the box and he slotted his left-footed shot into the net to spark wild scenes on the bench.
Croatia went close to reducing the arrears 12 minutes from time when Rebic worked his way into the box past a couple of Mexico defenders and fired in a shot goalwards which was brilliantly cleared off the line by Hector Moreno.
Mexic o made it 3-0 seven minutes from time when Marquez flicked on a corner to the far post and substitute Hernandez was on hand to head home from close-range.
Croatia made the scoreline look a little more respectable on 87 minutes when Perisic collected Rakitic's clever backheeled pass to score from inside the box.
Croatia ended the game with 10 men after Rebic was shown a straight red for a late tackle on Pena as the European side ended their campaign on a low note.