AL KHOR, Qatar (AP) — Kylian Mbappé vs. Lionel Messi.

Soccer’s latest superstar against perhaps the sport’s greatest player in the World Cup final just about everyone was hoping for.

France and Mbappé are headed back to the biggest game in soccer, and to a much-anticipated matchup with Argentina, after ending Morocco’s historic run at the World Cup on Wednesday.

In front of the country’s president, Emmanuel Macron, France beat Africa’s first ever semifinalist 2-0, with Mbappé playing a part in goals by Theo Hernandez in the fifth minute and substitute Randal Kolo Muani in the 79th.

Mbappé became a global phenomenon by leading France to the title in Russia in 2018 and has a chance to emulate Brazil great Pele as a champion in his first two World Cups when he comes up against the 35-year-old Messi, who has dominated the game with Cristiano Ronaldo for the past 15 years.

It’s the dream final for many, with France looking to become the first team to retain the title since Brazil in 1962 and Argentina on a mission to win soccer’s ultimate prize for the third time in what is likely to be Messi’s last World Cup.

“We need all our strength, all our energy to face a very competitive team with one of the legends in the sport with Messi,” France goalkeeper Hugo Lloris said.

There will be no team from the Arab world in the final of the first World Cup in the Middle East, a prospect that seemed nigh impossible before the tournament yet nearly happened in Qatar.

Morocco has been widely lauded for breaking ground for Africa and generated an outpouring of pride among Arab nations after topping a group containing Croatia and Belgium and eliminating two more European powers — Spain and Portugal — in the knockout stage. Their players gave France a far-from-easy ride, too, before collapsing on the ground in despair after the final whistle.

“We are disappointed for the Moroccan people — we wanted to keep their dream alive,” Morocco coach Walid Regragui said. “We felt we could have gone further but we have given a good image of Morocco and of African football. That was important to us.”

Remarkably, Hernandez’s early goal was the first scored against Morocco by an opposition player in the tournament — the other had been an own-goal in the group stage — but the team responded to that and injury issues in its defense with a fearless performance in front of tens of thousands of fans who dominated the 60,000-seat Al Bayt Stadium.

France was forced into some last-ditch defending at times but has developed a knack of pulling out victories despite not playing its best. The country will be playing in the final for the fourth time in the last seven World Cups, more than anyone else.

“It wasn’t easy,” France coach Didier Deschamps said, “and we showed our quality, experience and team spirit.”

Mbappé failed to add to his five goals in the tournament but helped create the opener for Hernandez when his shot deflected off a defender and into the path of the left back. Hernandez let the ball bounce before driving a downward effort into the net from a tight angle.

Typically a defense-first team, Morocco was forced to come out and play even though it was reeling from losing Nayef Aguerd to injury in the warmup and another center back, captain Romain Saiss, after only 21 minutes because of a hamstring injury. Both players were doubts ahead of the game but were risked by Regragui along with left back Noussair Mazraoui, who has had the flu and only lasted until halftime.

Roared on by its red-and-green-clad fans, Morocco came closest to scoring when Jawad El Yamiq hit the post with an overhead kick in the 44th minute and forced France to defend in numbers, with Antoine Griezmann — the team’s playmaker — effectively playing as a deep-lying midfielder and often clearing balls from inside his box.

However, Mbappé enjoyed more space as Morocco tired late in the second half and he was moved into a central position. After dribbling past two defenders, he took a shot that deflected toward Kolo Muani, who tapped in having been on the field for less than a minute.

The goal was celebrated in the VIP seats by Macron, who flew in for the match and had earlier visited the Souq Waqif bazaar in Doha before traveling to the stadium. The president congratulated France’s players in the locker room after the match.

They might need to raise their game against Argentina, though.

“Any team with Messi in,” Griezmann said, “is a totally different proposition.”

TOP SCORER

The World Cup trophy isn’t the only thing at stake on Sunday. Messi and Mbappé are tied as the leading scorers with five goals as they chase the Golden Boot award.

THIRD PLACE

Morocco’s World Cup isn’t over. The team will play the third-place playoff match against Croatia at Khalifa International Stadium on Saturday.

___

Steve Douglas is at https://twitter.com/sdouglas80

___

AP World Cup coverage: https://apnews.com/hub/world-cup and https://twitter.com/AP_Sports