The win was in stark contrast to England's bitterly disappointing Group G goalless draw at Wembley with Montenegro. Ugly hooligan violence by Serbian fans, meanwhile, disrupted their team's game against Italy in Genoa.
Miroslav Klose, Mario Gomez and Lukas Podolski all scored for Germany to give the team a maximum 12 points - five ahead of Austria, who drew a topsy-turvy game 4-4 in Belgium.
Coach Joachim Löw was delighted.
“We have 12 points and we are in a good place. I cannot ask for more,” he said.
England's loss, meanwhile, means Montenegro tops Group G on 10 points to England's seven, though the small Balkans nation has played one more game. Skipper Rio Ferdinand rued the match as an opportunity missed.
"These are the sort of games we should be winning," the defender conceded.
World champions Spain – who beat Germany in the last European championship final as well as the last World Cup semi final, briefly threw away a two-goal lead at Hampden Park before Fernando Llorente conjured a close-range winner barely three minutes after coming on in place of David Silva.
The 3-2 win ensured that the world and European champions maintained their run of winning all their qualifiers going back to a 2007 draw with Iceland - 17 matches ago.
David Villa was earlier on target from the spot with his 44th Spanish goal to go level with record marksman Raul while Andres Iniesta also netted with Steven Naismith and a Gerard Pique own goal briefly giving Scotland fans hope.
World Cup finalists Holland are also in a good place after Jan Claas Huntelaar and Ibrahim Afellay scored a brace each against the Swedes.
Liverpool fans will be fuming, though, after forward Dirk Kuyt was taken to hospital with a right ankle injury, having only recently returned from shoulder problems.
Events in Genoa, Italy, cast a shadow over the evening as hooliganism reared its ugly head, Serbian supporters throwing flares onto the pitch to force the postponement of their match with the Azzurri.
Following a half-hour delay, Scottish referee Craig Thomson stopped the encounter after just six minutes when a flare appeared to hit Italy goalkeeper Emiliano Viviano.
After police struggled to maintain order at the Marassi stadium, officials finally called off the match following meetings between UEFA, the Italian and Serbian Football Associations and the referee.
There had been problems before the game in the centre of town while Serbia's goalkeeper Vladimir Stojkovic was attacked by his own fans.
Italy coach Cesare Prandelli told reporters: "We're not playing, I've never
seen anything like this before.
"It seemed organised, listening to the Serbian players it turns out their team coach was attacked.
"Before the game the Serbian goalkeeper (Stojkovic) was in our dressing room and wasn't just afraid to play he was also afraid for his return home, he didn't understand anything."
Stojkovic used to play for Red Star Belgrade but now plays for Patizan Belgarde, angering hardcore Red Star fans.
Elsewhere, Russia head Group B following a 1-0 win in Macedonia after a Robbie Keane missed penalty saw the Republic of Ireland blew a chance to stay in pole position on the way to a 1-1 draw in Slovakia.
The Irish had taken the lead through Sean St Ledger before Slovakia equalised through Jan Durica. Russia lead the Irish and Slovaks by two points.
In Group D, France are emerging from their World Cup nightmare and sit atop Group D after a routine 2-0 victory over Luxembourg, courtesy of goals in either half from Karim Benzema and Yoann Gourcuff.
Belarus, who shocked France in the opening match, are only a solitary point adrift after a 2-0 win over Albania.
Cristiano Ronaldo meanwhile sent Portugal on their way to a 3-1 victory in Iceland with an early goal but his side stay two points behind early leaders Norway.