Spain reached the World Cup final for the first time after a second-half header from Carles Puyol secured a narrow victory over Germany after an intriguing match in Durban.
Vicente del Bosque's side won their third straight game 1-0 and will now play the Netherlands in Sunday's final at Soccer City.
Spain deserved their victory after controlling huge periods of the match, but once again it was far from a vintage performance.
Del Bosque's team improved on their scrappy performance against Paraguay in the previous round but still struggled to carve out clear openings.
The winning goal came when Puyol showed great determination to atone for a poor first-half miss by heading home Xavi's corner with 17 minutes remaining.
The Euro 2008 champions, who defeated Germany 1-0 in the final of that competition, should have scored a second after striking with the sort of counter-attack that had been a trademark of their opponents' play in this competition, but Pedro failed to pick out a completely unmarked Fernando Torres.
Germany had invited pressure by adopting an increasingly deep defensive line as the match wore on - and may regret not taking the game to their opponents more while it remained goalless.
Joachim Loew's team scored four against both England and Argentina in their previous games and had illuminated the competition with their bold play.
But they had few opportunities to strike on the counter against Spain and so Germany taste defeat at the semi-final stage for the second successive World Cup.
Spain coach Del Bosque chose Wednesday's tie to drop the out-of-form Torres, drafting in Barcelona's lively young forward Pedro and deploying David Villa as a lone striker.
And while Del Bosque's team certainly looked comfortable as they worked the ball around midfield, Germany showed excellent shape and discipline, and were rarely dragged out of position.
Spain did occasionally pick holes in the German defensive structure, with Pedro playing in Villa only for keeper Manuel Neuer to deny him after only five minutes.
Puyol headed over from a firm Andres Iniesta cross, wasting an excellent chance, while a raking cross-field pass from Xabi Alonso found Sergio Ramos in space, only for the Real Madrid full-back to drill his ambitious shot wide.
Germany did not have the opportunity to launch a counter attack until the 22nd minute, but that broke down after a miscommunication between Mesut Ozil and Lukas Podolski.
Loew's team looked increasingly threatening as the half wore on and had what initially appeared to be a strong penalty appeal in injury-time, after Ozil went down under a clumsy challenge from Ramos.
Ozil was certainly in a very threatening position after collecting a pass from Miroslav Klose and looked to be fouled, but replays suggested the initial contact had been made outside the area.
The start of the second half was a repeat of the first in that Spain passed and probed - but this time they started to seriously threaten Neuer's goal.
Alonso twice shot wide from distance, as did Villa with a low effort he tried to curl across goal, but the impressive Pedro did force a sharp save from Neuer.
Germany were dropping ever deeper and would have fallen behind but for two near misses. The first saw Villa come within inches of converting a low Iniesta cross, while Ramos was likewise agonisingly close to converting from Alonso's angled pass.
Loew brought on Marcell Jansen and Toni Kroos for Jerome Boateng and Trochowski as he tried to change the game in his team's favour.
And Kroos forced a save after a deep cross from Podolski, but shortly afterwards Puyol struck and Spain were able to close out the match to seal their place in the final and ensure that the World Cup will have a first-time winner in 2010.
Attempts on target
Attempts off target
Projected table based on current scores
|Group A teams||P||W||D||L||F||A||GD||PTS|
|Group B teams||P||W||D||L||F||A||GD||PTS|
|Group C teams||P||W||D||L||F||A||GD||PTS|
|Group D teams||P||W||D||L||F||A||GD||PTS|
|Group E teams||P||W||D||L||F||A||GD||PTS|
|Group F teams||P||W||D||L||F||A||GD||PTS|
|Group G teams||P||W||D||L||F||A||GD||PTS|