Carles Puyol's 73rd minute goal has put Spain into the nation's first World Cup final, defeating Germany 1-0, the same score the teams played to in the final of Euro 2008.
The goal came off a Xavi Hernández corner kick played to the spot, where Puyol was able to run onto his shot, headed between Manuel Neuer and Lukas Podolski for the match's only goal.
Spain had dominated the opening of the second half. With the exception of one Toni Kroos shot, Spain had created all of the half's chances, finally pay-off after Andrés Iniesta's effort created a corner kick along the left of the attack.
And with the exception of the last 25 minutes of the first half, Spain controlled the match. The Spanish came out with more energy than the Germans, stifling the German attack in their own end, and it was only after Spain had appeared to have worn down that the Germans looked to gain a measure of the match.
When the second half opened, that stretch of German competitiveness appeared to be an aberration, with Spain able to create chances for Xabi Alonso, Pedro and David Villa prior to Carles Puyol's goal.
Germany's best chance of the match had come just before the opening goal, when Lukas Podolski lofted a cross for Kroos, whose volley could not beat Iker Casillas at the `keeper's near post.
The Spanish now advance to their first World Cup final, where they will meet the Dutch on Sunday, ensuring the competition will have a first-time winner. The Netherlands have been to previous finals, in 1974 and 1978.
Germany has a Saturday match against Uruguay in the third place game.