Germany all but assured their place at the Euro 2012 finals in Ukraine and Poland as they maintained their 100% qualification record in Group A with a comfortable win in Azerbaijan.
Azerbaijan, who celebrated 100 years of football with visits from FIFA and UEFA supremos Sepp Blatter and Michel Platini, started well but goals by Mesut Ozil and Mario Gomez gave Joachim Low's side a clear lead.
Murad Huseynov pulled one back with a minute to go but Andre Schurrle restored the two-goal advantage in injury time and guaranteed Germany's seventh victory out of seven games.
The result all but confirms Germany's participation in next year's finals as they moved 11 points clear of third-placed Turkey, who have four games to play.
However, it was Azerbaijan who impressed at the start, Aleksandr Chertoganov producing a long-range effort from the left which went wide.
Berti Vogts' side were then inches away from taking a spectacular lead when Vuqar Nadirov's long-range shot hit the crossbar.
Vurgun Huseynov had a header on target but it was unlikely they would be able to sustain such an attack against the Germans and the group leaders began to assert themselves.
Toni Kroos hit the post with a free-kick from the left before his drilled shot was tipped round the post by Kamran Agayev with Germany's pressure paying off after half an hour.
Benedikt Howedes crossed from the right and found Ozil who drilled home a left-footed shot into the bottom right-hand corner of the goal.
Ozil then turned provider as Germany doubled their lead, the Real Madrid player's pass finding Gomez who slotted home from close range four minutes before half-time.
Germany started in much the same manner after the break with Philipp Lahm, Thomas Muller and Kroos all trying their luck.
Vagif Javadov and Nadirov sent in long-range efforts but Azerbaijan were grateful to Agayev who blocked Muller's close-range shot with his feet while Howedes put a header wide.
The game appeared to be heading for a routine win for the Germans before the hosts pulled one back through Murad Huseynov's shot from the six-yard box.
However, rather than the goal heralding a late rally it was the visitors who sealed victory through Schurrle's close-range effort in injury time.