GARMISCH-PARTENKIRCHEN, Germany(AP) Germany advanced to the Davis Cup quarterfinals Sunday after Nicolas Kiefer defeated Austria's Juergen Melzer in the decisive singles match.

Kiefer finished off a 7-6 (3), 6-4, 6-4 win in 2 hours, 26 minutes after Melzer's forehand went long to give Germany an insurmountable 3-1 lead. In the last match, Austria's Stefan Koubek beat Christopher Kas 6-2, 6-3 to make the final score 3-2.

Germany improved its Davis Cup record to 5-0 against Austria, which lost in the first round for the sixth time in a row.

Kiefer recently returned from an injury and replaced Rainer Schuettler, who lost to Koubek in Friday's opening singles match.

After a lot of injuries, I am just having more fun now and enjoying the game more,'' said Kiefer, whose team now faces a rematch against defending champion Spain.We have not had a lot of good results against Spain. And playing in Spain will make it even tougher. But we just have to take our chances.''

Kiefer broke Melzer in the first game of the second set and then broke again to go up 5-4 in the third.