France will take on Argentina in the World Cup final after beating Morocco 2-0 in an absorbing semi-final on Thursday (NZ time) to stay on course for a successful title defence and end the fairytale run of the north Africans in Qatar.
They will play Argentina in a mouthwatering World Cup final matchup on Monday.
Theo Hernandez scored in the fifth minute in a perfect start for the holders, who would have 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-run clash as Morocco overcame injury blows and showed no deference to France's reputation, taking the game to them in a gallant effort that 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.
For the first goal, Hernandez had to lift his left foot high to connect with a bouncing ball from a tight angle 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 as he attempted first to dribble through the Morocco defence and then shot, his effort blocked but falling 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 was wide from close-in.
But Morocco were never overawed and had opportunity as 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 come off, as he hurt his hamstring in the warm-up and skipper Romain Saiss having to go 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 halftime, from a poorly cleared corner by the French, with Lloris getting a vital touch as it hit the base of the upright.
France's victory set up the tantalising prospect of a decisive clash 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.
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 Sunday's third-place playoff against Croatia.
France 2 (Hernandez 5th min, Randal Kolo Muani 79th min) Morocco 0
Reuters.