France will take on Argentina in the 2022 World Cup final after beating Morocco 2-0 in an enthralling semi-final on Wednesday.
The victory helped them to stay on course to retain the title and end the fairytale run of the north Africans in Qatar.
Theo Hernandez scored in the fifth minute in a perfect start for the holders.
They had been looking for an early strike to silence the rowdy Moroccan support at the Al Bayt Stadium and dent the confidence of their team.
But it still proved a close-fought match as Morocco overcame injury blows and showed no deference to France’s reputation.
They took the game to them in a gallant effort which added to the glowing reputation they have earned at the tournament.
France settled the outcome with a second goal 11 minutes from time as substitute Randal Kolo Muani, with a first touch after coming on, tucked in a shot at the back post.
They are now into a fourth World Cup final and can become the first country to successfully defend their title since Brazil 60 years ago.
“There’s emotion, there’s pride, there’s going to be a final step, we’ve been together with the players for a month, it’s never easy, (and) there’s happiness so far,” said a smiling coach Didier Deschamps.
For the first goal, Hernandez had to lift his left foot high to connect with a bouncing ball from a tight angle.
It helped to finish off a sweeping move started by Antoine Griezmann’s run down the right and a cutback pass that Kylian Mbappe initially fluffed.
Mbappe was the creator of the second goal, after he attempted first to dribble through the Morocco defence and then shoot.
With his effort blocked, the ball fell for Kolo Muani to net.
Olivier Giroud struck the post and missed from point-blank range in the first half at the end of a barnstorming run through the middle from Aurelien Tchouameni.
The midfielder threaded a superb ball to find Mbappe, whose miscued shot was poorly cleared, allowing Giroud a first-time shot which went wide from close-in.
But Morocco were never overawed and created opportunities of their own.
Azzedine Ounahi forced two good saves out of French captain Hugo Lloris with speculative efforts, and curling set-pieces put the French defence under pressure.
The north Africans were hit hard by injuries to their key centre-backs, with the gamble of naming Nayef Aguerd in the starting line-up failing to work.
He hurt his hamstring in the warm-up and skipper Romain Saiss was forced off after 20 minutes.
Replacement centre-back Jawad El Yamiq was, however, closest to an equaliser with a spectacular bicycle-kick on the stroke of half-time.
It was from a poorly-cleared corner-kick by the French, with Lloris getting a vital touch as it hit the base of the upright.
“We gave the maximum, that’s the most important,” said Morocco coach Walid Regragui.
“We had some injuries, we lost Aguerd in the warm-up, Saiss, Mazraoui at half-time. We paid for the slightest mistake.
“We didn’t get into the game well, we had too much technical waste in the first half, and the second goal kills us, but that doesn’t take away everything we did before.”
France’s victory set up the tantalising prospect of a decisive clash.
This is between Argentina maestro Lionel Messi, at the end of his international career, and France’s Mbappe, emerging as the next superstar of the world game.
“Playing two World Cup finals in a row is an incredible moment. We did a good job, it was hard, but we are in the final. We will work hard to win this final,” Hernandez said.
Morocco’s exit was tempered by their achievement of becoming the first African and Arab country to reach the World Cup semi-final, a feat widely celebrated.
They can expect to be hailed as heroes when they return home after Saturday’s third-place playoff against Croatia.