(CNN) -- Defender Philipp Lahm struck a superb last-minute winner as Germany reached the final of Euro 2008 with a 3-2 victory at St Jakob-Park in Basel, as brave Turkey's fairytale run in the tournament finally came to an end.
Phillip Lahm wheels away in delight after his last minute goal saw Germany finally kill off Turkey's brave challenge.
A much-weakened Turkey side had dominated the first half but were only level at half-time after Germany's Bastian Schweinsteiger had cancelled out Ugur Boral`s opener.
The second half was a more even contest and looked to be going to extra-time after Germany striker Miroslav Klose and Semih Senturk of Turkey had each scored in the final 11 minutes.
But there was still time for Lahm to smash home the winner as the three-times European champions -- twice as West Germany in 1972 and 1980 -- reached Sunday's final in Vienna, where they will meet either Spain or Russia.
Turkey, playing in their first Euro semifinal, had captured the imaginations of the neutrals after staging remarkable comeback victories in their previous three matches, but with a team ravaged by injuries and suspensions a first-ever final appearance was always a tough ask.
Despite that though, the makeshift Turkish side were still quicker out of the blocks, with Germany goalkeeper Jens Lehmann needing to be alert to efforts from Colin Kazim-Richards and Hamit Altintop in the first 10 minutes.
Turkey then struck the woodwork in the 13th minute through Kazim-Richards, whose rising shot crashed against the top of the crossbar from 10 meters out following Ayhan Akman's cut-back.
The Germany defense was all at sea in the opening stages, while there was little to encourage Joachim Loew's side going forward either as Turkey bossed proceedings.
It was therefore no surprise when Turkey took a deserved lead in the 22nd minute through Ugur Boral.
The chance came after Kazim-Richards had hit the Germany crossbar for the second time -- this time with an effort which looped up into the air and onto the bar -- and Boral slotted home the rebound, despite Lehmann`s best efforts on the line.
Turkey's joy was short-lived though, as Germany equalized with their first chance of the match five minutes later through Schweinsteiger.
Lukas Podolski sent over a low cross from the left and Schweinsteiger darted in front of Mehmet Topal and with the outside of his right foot guided the ball across Recber Rustu and into the far corner of the net.
Opportunities were coming thick and fast at both ends with Semih's header saved by Lehmann, who was then almost left red-faced by Altintop`s deep free-kick, which the former Arsenal goalkeeper misjudged and needed to dive backwards to tip over.
Podolski then wasted a good chance for Germany when he was put clean through by Thomas Hitzlsperger, only for the Bayern Munich striker to blaze over with just Rustu to beat.
Turkey goalscorer Boral stung the knuckles of Lehmann with a free-kick before Sabri Sarioglu fired just over from distance as the underdogs finished the first half just as they started it -- in total control.
At the start of the second half Germany might have had a dream start had Swiss referee Massimo Busacca whistled for a blatant foul on Lahm. There was little doubt it was a foul and the only question was whether it was inside the Turkey area or not -- but the official gave nothing.
The match was more even in the second half, with the two defences looking much less charitable than the opening period.
The ever-threatening Boral fired a shot at Lehmann in the 71st minute before former Hitzlsperger saw his left-footed effort go just wide of the top corner.
Germany took the lead through Klose in the 79th minute. Rustu looked favorite to come out and claim Lahm`s lofted cross into the area, but Klose beat both the goalkeeper and Topal to the ball to send a glancing header into an unguarded net.
That might have spelt the end of some side`s hopes, but Turkey had proven themselves tough opponents and they yet again managed to net another late goal.
Sabri sent over a low cross and Semih managed to poke the ball past Lehmann at his near post.
That was not the end of the drama though as Germany showed their own determination by netting a last-gasp winner through Bayern Munich full-back Lahm, who raced into the area before being picked out by Hitzlsperger and kept his composure to fire past Rustu into the near top corner.
"It is an immense happiness that I am feeling," said Germany coach Joachim Loew. "That was a battle in which we have expended a lot of energy.
"We weren't very good in the first-half and in the second we weren't that good either, but we gritted our teeth and we wanted the victory.
"The Turks played really well, they chased after the ball a lot and we had heavy legs while the heat didn't do us any favors."