Mexico’s remarkable knack for escaping the group stage of the World Cup was continued in such style on Monday that it had Brazil looking nervously over their shoulder from the capital.

In the end second-half goals from Rafael Marquez, Andres Guardado and Javier Hernandez were not enough to win Group A, so they will instead offer sticky opposition to the Netherlands in Fortaleza on Sunday.

Croatia, for the third World Cup in a row, go home after three games, as the memories of their run to the semi-finals in 1998 grow dimmer and dimmer. Their miserable night was capped in the dying minutes when substitute Ante Rebic was sent off for a high tackle on Carlos Pena.

As Recife celebrated the agricultural festival of Sao Joao, Mexico made hay in the countryside on the outskirts of the city.

Hector Herrera’s corners from the Croatian right had been troubling the Europeans all night and in the 72nd minute the little Portugal playmaker found his mark. Former Barcelona centre-half Marquez rose above Vedran Corluka to power a header underneath the diving Stipe Pletikosa from five yards.

Three minutes later Mexico had doubled the lead and smoothed their progress to the second round. Hernandez drew the Croatia defence right before passing to Paul Aguilar, whose low centre was drilled high into the net by the unmarked Andres Guardado.

Manchester United’s unsettled Hernandez did his market value no harm when he added the insurance, prodding home Marquez’s flick-on in the 82nd minute.

Mexico had had to survive some serious wobbles to arrive at this position of complete relaxation, which was unperturbed by Ivan Perisic’s 88th-minute consolation.

17/26
Francisco Rodriguez: 6

18/26
Rafael Marquez: 6

Characteristically calm and composed, and scored the crucial first goal. Booked for foul on Perisic as he ran clear.

GETTY

19/26
Hector Moreno: 6

Enjoyed the physical battle with Mandzukic and made a few telling interceptions, including stunning block off the line from Rebic’s shot.

GETTY

20/26
Miguel Layun: 5

Got up and down the left-hand side well and belatedly got to grips with Srna after struggling in the first-half.

GETTY

21/26
Hector Herrera: 6

Unlucky not to score when first-half effort cannoned of the bar. Otherwise protected his defence and stayed tight to Modric.

GETTY

22/26
Andres Guardado: 7

A constant threat and made a number of surging runs into the Croatian penalty area. Capped off an impressive performance with well-taken goal.

GETTY

23/26
Giovani Dos Santos: 5

Disappointing display from the former Tottenham schemer. Couldn’t get on the ball and taken off for Hernandez with 30 minutes remaining.

GETTY

24/26
Jose Juan Vazquez: 5

Unable to make an impression but worked to help his defenders when required. Booked in the second half which puts him out of the last 16 clash with the Netherlands.

GETTY

25/26
Oribe Peralta: 6

Missed excellent first-half chance but moved the Croatian defenders around with runs in behind.

GETTY

26/26
Javier Hernandez: 6

Given half an hour to impress, and he did just that. Always on the lookout for a half-chance and duly poached Mexico’s third.

GETTY

To counter Mexico’s influential midfield three of Guardado, Herrera and Jose Vasquez, Croatia’s manager Niko Kovac employed a fluid 4-3-3, pushing Luka Modric to the right, with Jorge Sammir dropping to the bench and regular full-back Danijel Pranjic adding some bite in the middle of the park.

Initially, it worked like a charm and the European side dominated, placing plenty of pressure on the Mexicans, whose goalkeeper Guillermo Ochoa, the hero against Brazil, was lucky not to turn villain when he skewed a clearance straight to Ivan Perisic.

Next the Wolfsburg player was freed down the right channel by Mario Mandzukic but his bobbling cross was cleared for a corner. Croatia came closest to taking the lead from the set piece, only for Aguilar to head the ball off the forehead of Mandzukic, who looked certain to score his third World Cup goal in as many games.

It was all Croatia to that point when, in the 16th minute, Herrera belted a near-perfect left foot shot across the goal and on to the underside of the crossbar from 25 yards. Stipe Pletikosa was as much a spectator as any among the rabidly pro-Mexico crowd.

Herrera was getting on top of his battle with Modric as king of the midfield schemers. He slid a pass through to Oribe Peralta but, stretching, Mexico’s sole goalscorer in Brazil coming into Monday night managed only to divert the ball wide with his standing foot.

There followed a scrappy period punctuated by highly optimistic potshots from both teams before the game’s first moment of controversy. Herrera was causing havoc in Croatia’s defence with his corners and Mexico could have had a penalty when Darijo Srna, on the edge of the area, appeared to block one delivery with his outstretched arms.

Next Vedran Corluka had to effect a block, with his feet, after a mesmerising passage of passing by Mexico ended with a rather tame shot from Miguel Layun.

Evidently made aware at half-time of happenings in Brasilia, where Neymar was saving his team-mates’ skins, Croatia started to play with more urgency as a third straight World Cup threatened to end at the group stage.

After a quiet first half Modric came to life, one slaloming run from the former Spurs man had Marquez back-pedalling uncomfortably before conceding a corner, and after that he was inches from sending Mandzukic free with a floated through ball.

Peralta went close to releasing Giovani Dos Santos with a clever touch. Former Arsenal striker Dos Santos had a shot blocked before being withdrawn for Hernandez, a sign Herrera was not going to retreat and invite Croatia on.

Just like they did against Brazil, Mexico suddenly started to turn the screw and should have been rewarded with a penalty. Aguilar broke down the right and crossed to the back post where Guardado struck a left-foot volley, which Croatia’s captain Srna clearly blocked with his hands, his second such offence of the evening to go unnoticed.

Mexico were furious and while Jose Vasquez was booked for protesting, largely they channelled their anger well, forcing two goal-line clearances in the space of a frantic few minutes. Then came the goals.