DOHA - Lionel Messi missed a first-half penalty but Argentina's Alexis Mac Allister and Julian Alvarez scored in a 2-0 victory over Poland at Stadium 974 on Wednesday as both teams booked their places in the knockout stages of the World Cup.

Argentina's victory propelled Lionel Scaloni's side to the top of Group C and they will face Australia in the last-16 while second-placed Poland, who qualified on goal difference after Mexico beat Saudi Arabia 2-1, take on reigning champions France.

Argentina took the lead just one minute into the second half when Mac Allister got on the end of Nahuel Molina's cross and, despite making weak contact, he saw his shot creep over the line with Polish keeper Wojciech Szczesny beaten.

The goal was just reward for Argentina who had dominated possession while Poland had barely managed to get out of their own half, with the South American side's goalkeeper Emiliano Martinez a mere spectator for the majority of the game.

The second goal was the result of some patient buildup where Argentina knocked the ball around before Enzo Fernandez unlocked the defence with a through-ball for Alvarez, who found space in the box and smashed it into the top corner.

"We are satisfied with the match we played. It wasn't easy, it was a must-win match," Scaloni said.

"I think that we read the match very well, my players did a great job. They played very well and I'm very happy. Sometimes you're not happy, but today I am."

CONTROVERSIAL PENALTY

Poland were up in arms in the first half when Argentina were awarded a controversial penalty after a VAR check for a foul on Messi when Szczesny's glove brushed his face as the Paris St Germain forward rose up for a header at the far post.

But Szczesny was up to the task and despite the thousands of Argentina fans raising the decibel levels inside the arena, he kept his composure and guessed correctly, diving to his left and using one hand to swat aside Messi's effort from the spot.

Despite the miss, Messi ran the show for Argentina in a match where the two skippers represented Barcelona's past and present.

With a last-16 spot and potential elimination both on the cards in a close group, it was Barca's record goal scorer Messi who was at the heart of Argentina's attacks, dictating play by dropping deep and tormenting the Polish defence.

Poland's Robert Lewandowski, who has 18 goals in 19 games for Barca this season, did not have a single attempt on goal.

"He was very much involved and committed. I'm not attacking anyone in the team, but we didn't help him score," Poland coach Czeslaw Michniewicz said.

"If our team had a higher percentage of possession, if Messi played with us and Lewandowski played with Argentina, he would score five goals... Messi didn't score, did he?"

At the other end, Szczesny had been kept busy the entire half with the Poland defence breached time and again but the Juventus keeper stood firm to deny Argentina who grew more confident with every attack.

He first denied Alvarez when the Manchester City forward broke through the offside trap before he tipped Angel Di Maria's cross over the bar when his Juve team mate attempted to score directly from a corner kick.

'DREAM COME TRUE'

But Szczesny could do nothing but scramble helplessly when Mac Allister took his shot even before Poland could settle down after the restart while Alvarez's shot for the second goal was too good for any keeper.

"It's so emotional for me, for the whole squad. It's a dream come true," Mac Allister told reporters. "I debuted with this team, I'm so proud of that. And now managing to score in a World Cup - I'm so happy.

"(After Messi's penalty) we tried to stay positive, to stay calm. We did not feel down. We tried to be optimistic... Fortunately we managed to win and go through."

Argentina nearly made it 3-0 in second-half added time when Nicolas Tagliafico was released down the left and he chipped the ball over Szczesny, only to see Jakub Kiwior track back to make a timely intervention and head the ball off the line.

But Argentina got what they wanted -- leapfrogging Poland to take top spot in the group and avoid an early knockout fixture against the mighty France.

Poland, meanwhile, will be relieved to reach the last-16 by the skin of their teeth for the first time since 1986.

(Reporting by Rohith Nair in Doha, Additional reporting by Andrew Cawthorne; editing by Pritha Sarkar)