Substitute Olivier Giroud ended Spain's 24-match winning streak in qualifiers Tuesday, scoring a deserved equalizer on the final push for France to draw 1-1 in qualifying Group I for the 2014 World Cup.

Spain reserve Juanfran Torres gave away possession in midfield, allowing Franck Ribery to cross for Giroud to head beyond goalkeeper Iker Casillas in the fourth minute of added time in the match at Vicente Calderon stadium.

The world champions had led through Sergio Ramos' 25th-minute header and were on the verge of being 2-0 up in the 41st but goalkeeper Hugo Lloris saved Cesc Fabregas' penalty.

France dominated the second half and created multiple opportunities on the break to make up for its poor effort against Spain in a 2-0 quarterfinal loss at the 2012 European Championship in June.

Spain failed to win a qualifier for the first time since 2007. The European champions looked far from the world's best team after being constantly rattled and holding little possession over the closing stages.

With Didier Deschamps coaching this time around, France did not play ultra-defensively like in Donetsk and always looked dangerous on the break, particularly through Karim Benzema.

The French striker repeatedly found space between Spain's center backs Ramos and Sergio Busquets - a defensive midfielder who struggled as a defender. Javi Martinez had been available to fill the spot but watched on from the bench.

Coach Vicente del Bosque was forced to bring on Santi Cazorla for David Silva after 14 minutes because of injury but Spain still went ahead after Ramos first crashed a header off the post, but then slotted in after Fabregas' effort from the rebound was deflected by Lloris into his path.

But complacency soon crept in for the hosts as Benzema forced Real Madrid teammate Iker Casillas to tip his low shot around the post in the 34th as the momentum turned.

Lloris followed up his penalty save - after defender Laurent Koscielny fouled Pedro Rodriguez inside the area - with a pair of key saves from Fabregas and Pedro from inside the area just before the half.

Alvaro Arbeloa was the second Spanish player to leave to injury and the hosts' defense looked rattled as France peppered its goal with one opportunity after another. Casillas tipped away Benzema's effort in the 60th before Franck Ribery nearly scored.

Fernando Torres came on late in his return to the ground of former team Atletico Madrid, as Spain looked to score on the break.

But Atletico player Juanfran Torres' misguided attempt to surge forward saw Moussa Sissoko lead the push that led to Giroud's superb score that left both teams with seven points from three matches.

Iceland was the last team to take points off Spain in major championship qualifying in October 2007, with Greece the last team to do so on Spanish soil when it beat Spain 1-0 in 2003.