Spain will take on Asian surprise package Iran, who knocked out fancied Mexico by a similar margin in the day's another pre-quarterfinal clash at Margao, Goa.
Juan Miranda (44th minute) and Abel Ruiz (90th) scored for Spain, while Lenny Pintor struck for France in the 34th minute at the Indira Gandhi Stadium here.
Pintor put France ahead in the Round of 16 clash, but the lead did not last more than 10 minutes as Miranda restored parity just as the half time approached.
Moments before Spain erupted in joy, France had taken the lead when Pintor's right-footed shot from the centre of the box off Amine Gouiri's assist found the back of the net.
Also Read
Just when it appeared that the match between the two European giants would go into extra time, the Spanish were awarded a penalty, which Barcelona starlet Ruiz duly converted to break the French hearts and knock them out of the tournament.
Incidentally, France had lost to Spain in the quarterfinals of the European Championships.
In the four-minute injury time, Wilson Isidor's header from the centre of the box off Maxence Caqueret's cross was blocked by the Spanish defence.
There were attempts galore in both halves as France and Spain looked to outdo each other.
Before that, Pintor's right-footed attempt off Yacine Adli pass too was saved, as the Frenchmen's quest to find the equaliser ended in disappointment.
Spain, too, made their moves but they were also not effective enough.
Disclaimer: No Business Standard Journalist was involved in creation of this content