Lionel Messi missed a penalty but Argentina still clinched top spot in Group C with a 2-0 win over Poland.
Poland who squeezed into the last 16 on goal difference ahead of Mexico on a night of high drama.
Argentina went into the game a point behind Poland knowing a second-placed finish would pit them against France in the last 16, but goals from Alexis Mac Allister (46) and Julian Alvarez (67) after Wojciech Szczesny had saved a contentious Messi penalty secured a deserved win which means they will face Australia instead.
For Poland, qualification was hanging in the balance right until the end, Czeslaw Michniewicz’s side sensationally set to advance on fair play points before Saudi Arabia’s stoppage-time goal in their 2-1 loss to Mexico put the Poles through on goal difference.
Poland played out the final stages of their game knowing another goal for either Argentina or Mexico would knock them out of the competition, and needed a goalline clearance from Jakub Kiwior in stoppage time to keep the deficit at only two.