(CNN) -- David Villa came to Spain's rescue again to put the European champions into the World Cup semifinals for the first time with a hard-fought 1-0 victory over Paraguay in Johannesburg on Saturday night as both teams missed a penalty.
The striker, who scored the only goal in the second-round victory over Portugal, netted the winner with eight minutes to play to become the leading scorer at the South African tournament with five.
Spain will now play Germany in Durban on Wednesday for a place in final after the 2006 hosts thrashed Argentina 4-0 earlier on Saturday.
It will be a rematch of the Euro 2008 final, which Spain won 1-0.
"We didn't play well mainly because we didn't get enough of the ball," Spain coach Vicente Del Bosque told reporters.
"We are now among the four best teams in the world. Our next opponents are Germany, who are the best team at the moment."
Paraguay, playing in the last eight for the first time, had a goal disallowed in the first half and should have taken the lead in the 59th minute but Oscar Cardozo's penalty was saved by Spain captain Iker Casillas.
Xabi Alonso then had the chance to put the Spaniards ahead soon after but was also denied from the spot after having to retake his successful first attempt.
Paraguay, whose coach Gerardo Martino made six changes after the penalty shootout win over Japan in the previous round, easily contained Spain's renowned attacking prowess in a disappointing first half.
"We had chances but didn't take them. But never mind. I congratulate my players for their progress at the World Cup," Martino told reporters.
The South Americans felt aggrieved to have a 41st-minute strike by Nelson Valdez ruled out after Cardozo strayed into a marginally offside position, but wasted a glorious chance to go ahead after Spain defender Gerard Pique was booked for dragging on the arm of Cardozo.
But the Benfica player, who scored the winner against Japan, saw his shot saved by Casillas -- and then at the other end Villa was hauled down when clear on goal by Antolin Alcaraz, who was lucky not to be sent off.
Alonso coolly sent goalkeeper Justo Villar the wrong way, but the Paraguay captain was more successful the second time after Guatemalan referee Carlos Batres ruled that players had encroached into the penalty area before the initial kick was taken.
Villar was lucky not to concede another penalty as he clattered into Cesc Fabregas while trying to gather the rebound, but was helpless when Spain finally made the breakthrough.
Substitute Pedro fired a low shot onto the base of the woodwork, and Villa followed up with a strike that hit one post and bounced into the net off the other one.
Paraguay substitutes Lucas Barrios and Roque Santa Cruz had late efforts blocked in quick succession by Casillas, while Villa was denied a second by Villar.
It was another disappointing night for Villa's strike partner Fernando Torres, who was replaced by Fabregas with 20 minutes to play as he again looked well short of his usual high standards.
Paraguay's defeat leaves neighbors Uruguay as South America's only representative in the last four, facing the Netherlands on Tuesday.