Germany 2-1 Scotland
Scotland's hopes of reaching the Euro 2004 finals now rest on a possible play-off place, following their narrow defeat in Germany.
Goals from Fredi Bobic and Michael Ballack put the home side in front before Neil McCann hit back for Scotland.
However, the Scottish cause was dealt a major blow when substitute Maurice Ross was sent off just minutes after McCann's goal.
Germany now top Group 5 but Scotland will finish second if they beat Lithuania at home next month and Iceland fail to win in Germany.
Berti Vogts' side battled gamely in Dortmund but were overpowered by the muscular Germans and were guilty of squandering possession too easily.
The Scots were full of heart and running but lacked poise and creativity, and the home defence were seldom threatened.
There was a scare for Scotland after 10 minutes when goalkeeper Robert Douglas could only make the faintest contact with a corner kick and Ballack fired over from the edge of the six-yard box.
Scotland put together a good passing move a few minutes later and Colin Cameron and Paul Lambert were involved before McFadden's 20-yard shot was comfortably held by Kahn.
The Scots were sliced open on the right flank when Friedrich burst clear, but a wonderful sliding challenge from Jackie McNamara prevented Kevin Kurayni from connecting with the full-back's low cross.
However, the Germans went in front after 25 minutes following an error of judgement from Douglas.
The Celtic keeper could only palm a long range shot from Friedrich into the path of Kuranyi, who cut the ball back for Bobic to stroke it home from close range.
Scotland were being pinned back and Douglas had to look smart eight minutes later to stop a flashing header from Bobic.
The second half was four minutes old when Germany were awarded a penalty for Steven Pressley's barge on the airborne Bobic.
James McFadden struggled to make an impact for Scotland
Ballack drilled the spot kick straight down the middle after Douglas committed himself early.
Bobic missed an open goal from just eight yards and Kuranyi blazed a shot wide before Scotland hit back with a goal out of the blue.
Thompson broke down the right in the 62nd minute and his cross was volleyed home in style by McCann.
Kuranyi broke clear of the Scottish defence but the Stuttgart striker put his shot wide under pressure from Douglas.
Scotland skipper Lambert did not appear for the second half and his replacement Ross only lasted 20 minutes before he was red carded for two challenges on Tobias Rau.
The Germans used their extra man advantage to push the ball around and stretch the tiring Scots and the home side carved open a series of half-chances in the closing stages.
Substitute Gavin Rae had a sight of goal in the 89th minute but the Dundee midfielder's 20-yard shot flew well wide of the target.
Germany: Kahn, Friedrich, Worns, Ramelow, Rau, Rehmer, Baumann, Schneider, Ballack, Kuranyi, Bobic. Subs: Lehmann, Lauth, Kehl, Klose, Hartmann, Hinkel, Rahn.
Scotland: Douglas, McNamara, Pressley, Dailly, Naysmith, McFadden, Cameron, Lambert, Ferguson, McCann, Thompson. Subs: Gallacher, Ross, Webster, Wilkie, Rae, Devlin, Dickov.
Referee: Anders Frisk (Sweden)