Lionel Messi’s World Cup dream remains alive after Argentina dispelled fears of a premature group-stage exit from the World Cup with an ultimately convincing 2-0 victory over Poland on Wednesday.

Poland, despite a poor performance, also went through as Group C runners-up, pipping Mexico by the narrowest of margins on a dramatic night in Qatar.

Australia will join them in the last 16 after holding on for a famous 1-0 win over Denmark, who will head home along with Tunisia from Group D.

Here, the PA news agency takes a look at how the day unfolded.

Argentina stay alive

Julian Alvarez scores against Poland
Julian Alvarez made victory certain for Argentina by scoring their second goal (Adam Davy/PA)

After losing their opener to Saudi Arabia, Argentina have had to do it the hard way.

Defeat against Poland at Stadium 974 would have put them out and a draw would have left them sweating on the other result, but in the end the South Americans powered through.

Poland rarely threatened and, after Messi had a penalty saved by Wojciech Szczesny in the first half, Argentina proved too strong in the second half.

Goals from Brighton’s Alexis Mac Allister and Manchester City striker Julian Alvarez settled the result but the drama continued as the battle for second place in the group between Poland and Mexico came down to goal difference.

Argentina spurned a number of chances that could have eliminated the Poles and Robert Lewandowski and Co breathed a huge sigh of relief after resisting further damage and learning Mexico had ‘only’ won 2-1.

Mexico just fall short

Mexico’s Carlos Rodriguez (left) and Jesus Gallardo (right) appear dejected after Mexico are eliminated
Mexico were left dejected despite beating Saudi Arabia (Nick Potts/PA)

Mexico had arguably been the outsiders of the four sides in their group going into the final round of fixtures yet, in the end, they missed out only by the skin of their teeth.

Saudi Arabia had their fate in their own hands at the Lusail Stadium, knowing a victory would see them qualify, but they failed to replicate their heroics of earlier in the tournament.

Mexico dominated throughout and a goal from Henry Martin and stunning free-kick by Luis Chavez put them on the brink of qualification.

Another goal might have done the trick but they had two efforts disallowed for offside and a late Saudi consolation from Salem Al Dawsari ended their hopes.

How are teams level on points separated?

For most of the second half, with the scoreline in both Group C games 2-0, Poland were clinging on to second place by virtue of having accrued fewer yellow cards in the tournament than Mexico.

At this point, the two sides were level on points, goal difference and goals scored, while their head-to-record was irrelevant as their game ended 0-0.

Had the teams also had identical disciplinary records, FIFA might have needed to draw lots to separate them.

Socceroos through after edging out Danes

Australia reached the knockout stage for only the second time in their history and the first time since 2006 as they stunned Denmark 1-0.

Mathew Leckie finished a brilliant counter-attack on the hour to score the only goal at the Al Janoub Stadium and secure second place in Group D behind champions France.

Denmark had needed to win to have any hope of progressing but, despite dominating possession, they could not breach the resilient Aussies.

The defeat capped a miserable tournament for the side ranked 10th in the world by FIFA and sees them head home after collecting just one point from three games.

Tunisia also miss out despite famous win

Tunisia’s Wahbi Khazri is buried by team-mates after scoring what proved the winner against France
Tunisia’s Wahbi Khazri was buried by team-mates after scoring what proved the winner against France (Jonathan Brady/PA)

Tunisia’s hopes of getting through had depended on them claiming what had seemed an unlikely win over France, and getting a favourable result in the other Group D game.

Against the odds, they managed to keep their end of the bargain as they claimed a famous 1-0 victory over the holders at the Education City Stadium with a fine individual goal from Wahbi Khazri after 58 minutes.

With his side already through, France coach Didier Deschamps had made wholesale changes but the Tunisia goal brought a sense of urgency with star pair Antoine Griezmann and Kylian Mbappe sent on.

Griezmann looked like he had snatched an equaliser late on but his volley was ruled out by VAR.

The relief was bittersweet for Tunisia, with victory secured but Australia’s win ultimately denying them.

Picture of the day

Mathew Leckie celebrates scoring against Denmark
Mathew Leckie celebrates his crucial goal against Denmark (Martin Rickett/PA)

Tweet of the day

Who’s up next?

Group F: Croatia v Belgium (3pm, BBC One)
Group F: Canada v Morocco (3pm, BBC Two)
Group E: Japan v Spain (7pm, ITV1)
Group E: Costa Rica v Germany (7pm, ITV4)