New Chelsea signing Loic Remy grabbed the only goal as France squeezed past 2010 world champions Spain 1-0 in a friendly at the Stade de France on Thursday (today NZ time).
The second-half substitute netted in spectacular style in the 72nd minute, pouncing on a pass from Mathieu Valbuena to give Didier Deschamps's team a deserved victory.
Vicente del Bosque's new-look Spain side, who suffered a shock first-round exit at the 2014 World Cup in Brazil, lacked creativity in midfield and never looked threatening up front.
France, who will host Euro 2016, left it late to score but showed some of the quality that took them to the last eight of the World Cup.
''It was a good night. We needed to keep the spirit of the World Cup,'' Deschamps told a news conference.
''There were some quality moves. We made a good start, then we suffered a lot for at least 20 minutes but we regained the upper hand in the second half.''
While the hosts benefited from the power of Paul Pogba and Moussa Sissoko in midfield, Spain sorely missed Xabi Alonso and Xavi, who have retired from internationals, and the injured Andres Iniesta and had no shots on target.
Deschamps made one change from the team that started the World Cup quarterfinal against eventual champions Germany, Sissoko taking Yohan Cabaye's place in midfield.
Vicente del Bosque decided to bring in Manchester United keeper David De Gea for Real Madrid's Iker Casillas who had a nightmare World Cup.
Spain, who also brought in Raul Garcia and Mikel San Jose, failed to shine while Remy's club mate Diego Costa looked a shadow of his usual self in attack.
Karim Benzema had a goal for France ruled out for offside five minutes into the second half after he beat De Gea with a clever flick from a cross by Sissoko.
Valbuena then went just wide in the 64th minute following a pass from Blaise Matuidi.
Former Queens Park Rangers striker Remy, who came on for Antoine Griezmann just before the hour, finally broke the deadlock with a curling, first-time shot from 18 metres.
Second-half substitute David Silva had Spain's best chance in the 83rd minute when his low cross-shot went narrowly wide.
Champions Spain start their Euro 2016 qualifying campaign against Macedonia in Valencia on Monday (Tuesday NZ time) in Group C which also includes Ukraine, Belarus, Slovakia and Luxembourg.
''I think there were some positives,'' Del Bosque told the Spanish TV broadcaster Cuatro. ''We couldn't win the game but I think we put on a good show.
''The important thing [in the first half] was that we created things, we had possession, we knew how to control the game and we didn't feel stretched at any point. Overall it was a good test for Monday's game.''
France's next match is a friendly in Serbia on Sunday (Monday NZ time).
Which EPL club should Winston Reid play for?