Lionel Messi had a penalty saved but Argentina still advanced to the last 16 of the World Cup as Group C winners after a 2-0 victory over Poland on Wednesday.
Poland also went through as runners-up although a 2-1 win for Mexico over Saudi Arabia in the group's other game meant Czeslaw Michniewicz's side advanced only on goal difference.
Alexis Mac Allister's 46th-minute goal settled Argentina's nerves after a tense first half, before Julian Alvarez doubled their lead just over 20 minutes later.
Messi said Argentina's 2-0 win over Mexico in their previous match had given them "serenity" and looked forward to a last-16 match-up with Australia.
"We went out there thinking we had to win," said Messi.
"The game against Australia will be difficult - anyone can beat anyone. It's very even, we have to prepare for the game in the best way, as always."
Argentina had been unable to find a way past Wojciech Szczesny in an opening 45 minutes in which the Poland goalkeeper saved his second penalty of the tournament.
Szczesny was adjudged to have fouled Messi while stretching to reach a cross, but he dived to his left to beat away the resulting spot-kick.
It was the 31st penalty Messi had failed to convert in his career.
"I'm angry at missing that penalty but the team came out stronger after my mistake," he said.
"We knew that once the first goal went in it would change the game."
Poland - who now face France in the last 16 - offered little attacking threat, with star striker Robert Lewandowski virtually anonymous throughout.
Instead it was left to Szczesny to take centre stage for the Poles, denying Messi with two crucial early stops.
First Messi wriggled clear of a pack of defenders before producing a shot that flew straight at the keeper.
Then he found space to charge into the Polish box down the left, forcing Szczesny to make a save at his near post.
Argentina continued to create the better chances in the first half and Marcos Acuna flashed a shot wide after Alvarez had also gone close to breaking the deadlock.
Szczesny had to scramble to stop Angel di Maria scoring direct from a corner, before the goalkeeper was again called into action to deny Alvarez.
Szczesny outdid himself when he dived to his left to stop Messi's penalty in the 39th minute.
He still had more to do before the half-time whistle, punching away a shot from Alvarez before saving the follow-up from Rodrigo de Paul.
There was nothing he could do when Mac Allister broke the deadlock less than a minute after the interval.
Nahuel Molina charged down the right, then cut the ball back for Mac Allister to drill just beyond Szczesny's reach.
The goal forced Poland to show some belated attacking ambition and Kamil Glik headed just wide from a free kick almost immediately after the restart.
Argentina continued to go in search of more goals and Alvarez scored their second after combining well with Enzo Fernandez.
Fernandez, making his first start for Argentina, picked out his team-mate, who held off a defender before lashing the ball past Szczesny.
"We were trying to score the whole time and I think we're back to being the team we used to be," said Mac Allister.
"We controlled the ball more, we were calm and we didn't get desperate. We played a great match."
Poland were still walking a tightrope with yellow cards potentially crucial to their chances of reaching the last 16.
Grzegorz Krychowiak went into the book in the 83rd minute but a late goal for Saudi Arabia against Mexico saw the Poles safely through on goal difference.
"It was not a match for a striker but I knew it would be like this," Lewandowski said.
"For me, for the Poland team, given the possibilities we have, it was a success.
"No-one will remember what this match was like - we will just be getting ready for France."
Agony for Mexico
Meanwhile, Mexico suffered an agonising exit from the World Cup on goal difference despite beating Saudi Arabia 2-1 in a dramatic finale to Group C.
Second-half goals from Henry Martin and Luis Chavez secured victory for Mexico at Lusail Stadium but they finished third behind Poland after Salem Al-Dawsari's late strike.
Mexico desperately pushed for a third goal in an effort to improve their goal difference as they faced elimination on FIFA fair play rules but they fell short.
"That's why we went for it," said Mexico coach Gerardo Martino. "We knew Poland had fewer yellow cards and it was necessary in that moment because of the other result.
"It's a great sadness and I assume responsibility for this huge failure."
Saudi Arabia's win over Argentina in their opening match was one of the greatest upsets in World Cup history but they crashed back down to earth with a 2-0 loss to Poland in their second game.
Coach Herve Renard urged his players to show that was no flash in the pan and write themselves into Saudi football history by reaching the knockout rounds for the first time since 1994.
"Before this game we were dreaming to do it again," said Renard. "With the game we did today we didn't deserve to go to the second round."
"Mexico were much better than us," he added.
Having failed to win either of their first two group games for the first time in 44 years, Mexico knew victory was essential if they were to stand a chance of reaching the last 16 at an eighth successive World Cup.
Martino ditched the back five he used in the 2-0 loss to Argentina and brought in Martin to lead the attack.
It almost reaped immediate rewards but Saudi goalkeeper Mohammed Al-Owais raced out to block Alexis Vega after he was slipped in behind the defence by Hirving Lozano.
Al-Owais, one of the heroes of the 2-1 win over Argentina, tentatively palmed away a bouncing cross ahead of a lunging Martin and held weak attempts by Chavez and Orbelin Pineda.
Mohamed Kanno whipped a free kick just over for Saudi Arabia, who saw defender Ali Al-Bulayhi forced off with injury - adding to their mounting casualty list.
Mexico continued to attack without success and Ali Al-Hassan nearly sent the bulk of the largely Saudi crowd wild late in the first half with a diving header that flashed wide of the far post.
Chavez tested Al-Owais right after the interval and Martin soon broke the deadlock as he turned in from close range following Cesar Montes' clever flick-on at a corner.
Mexico's second goal arrived just five minutes later when Chavez sensationally curled a free kick into the top corner from 30 metres.
Keeping an eye on the score between Argentina and Poland, Mexico pressed relentlessly for a third goal, with Lozano's effort ruled out for a tight offside.
Martin blazed over when he had a glorious chance and Chavez had another free kick turned away by Al-Owais, who also sprawled to his right to claw out a drive from Lozano.
Uriel Antuna then had another goal disallowed for offside before Al-Dawsari's late strike.