A "light-headed" Johanna Konta was given the option of retiring during her Fed Cup win over Serbia's Aleksandra Krunic by captain Anne Keothavong.
The exhausted British number one - playing her third three-set match is as many days - was slumped on the floor during a break after the second set.
But she recovered to win 7-6 (7-1) 3-6 6-2, sending GB into April's play-offs.
"She didn't have to continue if she felt like she couldn't, but she wanted to," Keothavong said.
"She showed so much courage and determination to find a way.