BLOEMFONTEIN, South Africa (AP) - Spain earned its record 15th straight victory Saturday with a 2-0 win over South Africa, a result which allowed the host nation to scrape into the Confederations Cup semifinals along with the European champions.
Moments after missing a penalty, David Villa took a high cross on the chest in the 52nd minute and with perfect control, turned and shot past Itumeleng Khune with an angled shot.
In a goalmouth scramble off a cross from Xavi Hernandez, striker Fernando Llorente added a second goal in the 72nd.
South Africa and its fans were dependent on the score in the other Group A game between Iraq and New Zealand. The 0-0 result unleashed huge celebrations among the 38,212 fans at the Free State Stadium.
Spain won Group A with nine points, while South Africa is second with four. Iraq finished with two and New Zealand earned one.
"The important thing is we go to the semifinals," Bafana Bafana coach Joel Santana said. "It is important for the players. It is important for the people."
Since a big loss could possibly have eliminated South Africa, Bafana Bafana was all too pleased to see when Spain coach Vicente del Bosque pulled off Villa and fellow striker Fernando Torres in the 60th, dulling Spain's fabled forward thrust.
The opening goal was Villa's 31st in his 47th appearance. He trails only Raul Gonzalez's mark of 44 goals from 102 matches.
Even though Spain dominated with skill and grace, it was South Africa which kept pushing, chasing down balls and hustling opponents throughout the match to make sure the tournament turned into a motivational boost ahead of the World Cup.
The victory gave Spain one more win than Brazil had in separate runs in 1969 and 1970. Spain also matched Brazil's record 35-match unbeaten run, a streak set between 1993-96.
"It's very important because we continued along the same route that the streak has been marked by," Del Bosque said. "The ones that will come will be the most difficult though.
"We played very securely, against a rival with great potential," Del Bosque added.
The Spanish haven't lost a game since 2006, winning last year's European Championship along the way as it was propelled to the top of FIFA's rankings - 71 places above South Africa. With such stakes, Del Bosque didn't rest his top players even though the team had already qualified.
The slick work between playmakers Xavi Hernandez and Cesc Fabregas feeding Villa and Torres worked well enough but the finishing was off during the first half.
A sturdy South African defense of four players backed by three holding midfielders was partly to blame, and at the back the towering Matthew Booth was as rudimentary as he was efficient.
"They're not No. 1 in the world for nothing," South Africa midfielder Steven Pieenar said. "If you're not well organized they can punish you and that's what happened today."
Santana has often been rebuked for his conservative tactics but few could disagree with his decision to field only one striker and pack the midfield with five men.
Bernard Parker had proved his standing with two goals against New Zealand, which meant that fellow forward Thembinkosi Fanteni was sidelined to allow for the return of holding midfielder Benson Mhlongo.
Parker ran all he could but was too solitary a figure to be effective. Most danger came from creative midfielders Steven Pienaar and Teko Modise.
After some Spanish players had criticized the use of the blaring vuvuzela horns, the fans made sure they rang in their ears for most of the match.
As it became clear that qualification could turn by a few goals in either of the games, the Bafana Bafana fans grew quiet with tension and apprehension.
The final whistle could even release them since the other game was still ongoing. The players huddled in midfield, the vuvuzelas blared and a huge cheer went up when the draw was announced that let them through.
Solemnly, the players embraced in a big circle and ran up to the fans to congratulate them.
"It's going to be tough. I'm just happy we got through," Pienaar said.
Lineups:
Spain: Pepe Reina, Carles Puyol, Raul Albiol, Gerard Pique, Alvaro Arbeloa (Santi Cazorla, 81), Cesc Fabregas, Sergio Busquets, Xavi Hernandez, Albert Riera, David Villa (Pablo Hernandez, 60), Fernando Torres (Fernando Llorente, 60).
South Africa: Itumeleng Khune, Siboniso Gaxa, Tsepo Masilela, Aaron Mokoena, Matthew Booth, Steven Pienaar, Macbeth Sibaya (Katlego Mashego, 83), Teko Modise, Kagisho Dikgacoi, Bernard Parker (Siphiwe Tshabalala, 90), Benson Mhlongo.