SAINT-DENIS, France (AP) Spain ended France's seven-game unbeaten run as substitutes David Silva and Gerard Deulofeu scored second-half goals to secure a 2-0 win over the European Championship runner-up in a friendly at the Stade de France on Tuesday.
It was France's first loss since its 1-0 defeat to Portugal at the same venue in the Euro 2016 final last summer.
The match also saw the first use in France of video replays to help the referee, with the technology being used to confirm Deulofeu's goal and to disallow one for France's Antoine Griezmann just after halftime.
Spain coach Julen Lopetegui's substitutions early in the second half proved decisive as Deulofeu won a penalty only 15 seconds after coming onto the pitch in the 66th minute. Deulofeu was obstructed in the box by defender Laurent Koscielny and Silva sent keeper Hugo Lloris the wrong way to break the deadlock.
Silva's goal was a reward for a good spell of dominance from Spain that started after Lopetegui replaced Andres Iniesta and Isco with Thiago Alcantara and Silva in the 53rd minute.
Deulofeu then rounded off a fast counterattack with 13 minutes left to make it 2-0 from an assist by Jordi Alba.
''The video helped giving credit where credit was due,'' Lopetegui said when asked about the impact on the video replays on the result. ''I want to praise my players for their very good match, I'm happy with their attitude.''
France coach Didier Deschamps acknowledged Spain's superiority and said video technology could be good for ''fairness in sport.''
''For sure the result would not have been the same,'' Deschamps said. ''Tonight it played against us. But we had been warned and the match can't be summed up by this.''
With the French League Cup final between Paris Saint-Germain and Monaco scheduled on Saturday, Deschamps rotated his team.
However, he gave Monaco teenager Kylian Mbappe his first international start, three days after the gifted striker made his debut in a 3-1 win at Luxembourg in a World Cup qualifier. Mbappe showed his trademark speed and dribbling skills, but could not provide the necessary finish during his 65-minute performance.
Deschamps also picked three Spain-based players in his 4-3-3 formation, with Atletico Madrid forwards Griezmann and Kevin Gameiro starting alongside Barcelona defender Samuel Umtiti.
Lopetegui reshuffled his attack after a 4-1 win over Israel last week with Alvaro Morata starting up front but kept the same back four of Gerard Pique, Sergio Ramos, Alba and Daniel Carvajal to contain the France strike force.
After a minute's applause in memory of former France and Real Madrid great Raymond Kopa, who died earlier this month aged 85, France immediately created danger down the left flank. Gameiro combined well with Griezmann and Layvin Kurzawa crossed the ball for Mbappe, who forced keeper David De Gea into a good save with a low shot.
France had another good chance in the 10th minute from a free kick after Koscielny lost his marker to connect with Griezmann's cross, but his header at the far post was cleared off the line by Pique.
France's dominance did not last long, with the inexperienced midfield pairing of Adrien Rabiot and Corentin Tolisso being outclassed by their Spanish counterparts.
Iniesta got his team's first chance when he curled a shot just wide from inside the box in the 14th minute. He had another effort on goal near the half-hour mark after being set up by Pedro, but France captain Hugo Lloris - who equaled Fabien Barthez's record of 87 caps for a France goalkeeper - thwarted his attempt.
Griezmann thought he had put France ahead seconds after the interval when he beat De Gea with a fine header, but the strike was ruled out for an offside after a quick review of the move by the video assistant referee. Technology was involved again in the 77th minute to overturn an incorrect offside call against Deulofeu after his close-range finish to make it 2-0. Deulofeu was made to wait to celebrate the goal but the correct decision was given.
''Deulofeu was decisive, if he keeps playing like this, he's got a bright future in front of him,'' Lopetegui said.
France's next World Cup qualifier is in June against Sweden in Group A, which the French lead by three points. Level on points with Italy at the top of Group G, Spain travels to Macedonia on June 11.