France defeated Nigeria 3-2 in extra time on Sunday to advance to the semifinals of the Under-20 World Cup, where it will face two-time champion Portugal.

Gueida Fofana gave France a 2-1 lead in the 102nd minute, and two minutes later Alexandre Lacazette picked up his second goal of the match to seal the victory. Maduabuchi Ejike scored his second goal in the 111th to give Nigeria hope of a comeback, but the west Africans couldn't score again.

Nigeria had equalized in the final seconds of second-half stoppage time on a header by Ejike. Lacazette had given France the lead in the 50th with his first goal of the match.

This is the first time France has reached the semifinals of the Under-20 World Cup.

''This is the achievement of a new generation,'' France coach Francis Smerecki said. ''This showed when Nigeria tied the match. I think we can end up as champions, but we are aware there are some strong rivals.''

Nigeria came into the match having won its first four decisions and was the highest scoring team in the tournament. But France managed to slow the Nigerian attack for most of the game, giving up possession but few threatening chances.

The elimination is another disappointment for the Nigerians, who have finished second two times - in 1989 and 2005.

''It is sad to go out like this,'' Nigeria coach John Obuh said. ''We believe this is a game we should have won.''

France went ahead when Clement Grenier slipped a perfect through ball to Lacazette, who slotted the shot past keeper Dami Paul at the far post.

Nigeria's slick passing and possession game worked better in the second half, with Abdul Ajagun and Ahmed Musa several times testing French keeper Jonathan Ligali.

But the equalizer came in the final seconds of second-half stoppage time when Uche Nwofor headed on a long clearance to teammate Ejike, who headed it behind Ligali.

France looked flat for the first minutes of extra time, but suddenly exploded with two goals.

Fofana gave France a 2-1 lead in the 102nd minute, catching keeper Paul slightly off his line and lobbing a ball from 25 meters (yards) and that sailed in over his head.

Two minutes later, Lacazette got his second to make it 3-1. Lacazette pulled Paul out of the goal, then stepped around him and fired the shot just inside the far post.