Stuttgart, Germany, 8 February 2015 | AAP

Sam Stosur has fallen agonisingly short in a three-hour Fed Cup classic after Jarmila Gajdosova produced one of the wins of her career to share day one honours with Germany in Stuttgart.

Gajdosova, a surprise selection in singles ahead of higher-ranked compatriot Casey Dellacqua, gave Australia a perfect start in the best-of-five World Group tie by rallying to defeat German No.1 Angelique Kerber 4-6 6-2 6-4 on Saturday.

World No.25 Stosur also showed incredible fight in the second singles rubber before falling to 12th-ranked Andrea Petkovic 6-4 3-6 12-10 in the longest ever Fed Cup match involving an Australian.

> check out Fed Cup scores and draws

The defeat denied the visitors a 2-0 lead in the first-round, indoor-hardcourt tie but proud captain Alicia Molik felt her team remained in a winning position heading into day two on Sunday.

“The tennis and the fight shown from both Sam and Jarka today was quite incredible,” Molik said.

“That’s going to be really inspiring for us tomorrow.”

Stosur and Gajdosova are expected to back up for the reverse singles as Australia look to avenge last year’s semifinal loss to the Germans in Brisbane and clinch a second successive appearance in the competition’s last four.

Stosur, the Australian record holder for most Fed Cup wins, admitted her loss to Petkovic would live long in the memory.

Both players served incredibly in a final set lasting one hour and 49 minutes after Stosur had fought back from a break down in all three sets.

Stosur missed a match-point passing shot on Petkovic’s serve at 5-4, the German eventually able to steal a remarkable match with the help of an enthusiastic, but respectful, home crowd.

“I’ve played lots of matches in Fed Cup that kind of stick in the mind but that one’s going to be up there, even though I came out on the wrong side,” Stosur said of the the match, which lasted three hours and 16 minutes.

“At the end of the day I gave it everything I’ve got and that’s all you can do.”

Stosur must bounce back quickly to face Kerber in the pivotal third singles rubber on Sunday (2230 AEDT) and Molik is adamant she’ll be mentally and physically up for it.

“You have an individual in Sam who is one of the most professional tennis players on the tour,” Molik said.

Gajdosova will face Petkovic in the other reverse singles match with Stosur and Dellacqua named to face Sabine Lisicki and Julia Goerges in the potentially-decisive doubles rubber.