Johanna Konta battled through fatigue to send Great Britain into April’s Fed Cup promotion play-offs, with her win over Aleksandra Krunic sealing a 2-0 victory over Serbia.
Konta, seen lying on the floor in the gangway before the start of the third set, needed to be helped to her feet at the end of her 7-6 (7-1) 3-6 6-2 win.
Her team-mate Katie Boulter had earlier dismissed Ivana Jorovic 6-4 6-3.
GB are one win away from reaching World Group II for the first time since 1993.
Victory completed a perfect four days for GB in their first Fed Cup matches on home soil for 26 years, as they won all four of their ties in Bath without losing a single rubber.
A determined Konta showed terrific spirit to find enough energy to win her third three-set battle in as many days, having been on court until after 23:00 GMT on Friday.
GB captain Anne Keothavong told BT Sport: “The guts, the courage by Jo and Katie today… Physically, if I could tell you what’s going on behind the scenes.
“These girls are so strong. I don’t know what to say. I’m just so proud.”
Great Britain will now play in April’s play-offs for a third successive year as they seek to reach the second tier of women’s team tennis.
Following a relatively slow start, Konta fought back from a break down early on and then raced in to a 6-0 lead in the first-set tie-break before Krunic went long with a backhand on the Briton’s second set point.
But a determined Krunic looked fresher and sealed the second set when Konta netted a backhand after a strong defensive recovery from the Serb at set point.
However, after a comfort break – during which an exhausted Konta was seen on the floor – the British number one steadied herself remarkably to move a break up to 3-1 in the third set.
And she broke again in the final game to take the set 6-2, emotionally sinking to the floor after sealing it with her second match point.
Her watching parents were visibly upset and her mum Gabriella rushed down to the court to give her daughter a hug.
“I’m feeling pretty rubbish but it’s OK,” Konta said.
Her victory prompted wild scenes in Bath, with the enthralled home crowd saluting Konta, Boulter and doubles players Harriet Dart and Katie Swan for winning all of their matches against Slovenia, Greece, Hungary and Serbia over a gripping four-day event.
Boulter, 22, took the responsibility of leading out the hosts in her stride. She took charge of all four of her opening sets and went on to deliver four valuable wins, unfazed by a growing gaze of media spotlight. In the process, she ever so slightly eased the pressure on Konta.
Leicester-born Boulter, who battled through a thriller against Hungary’s Dalma Galfi to win in a third-set tie-break on Friday, needed no such drama to overcome Jorovic on Saturday, coming through in one hour 28 minutes.
Jorovic, ranked 34 places lower than world number 83 Boulter, was the more error-prone and the Briton took advantage to win six of her 11 break points, to the delight of another sold-out crowd at the University of Bath.
“I came in to this week not knowing what to expect,” said Boulter, who before this week had only played two Fed Cup doubles matches. “To come out with four wins is probably better than I imagined.
“I wasn’t going in to this week thinking ‘I’m going to win four matches’. I was just putting my heart on the line and doing the best that I can, and then seeing what comes of it.
“Playing for your country is a little different to just playing for yourself. You’re trying to make people proud.
“It is very special and hopefully I can replicate that many more times.”
Britain have played outside the Fed Cup’s top two tiers since 1993, but still need to win another fixture to go up to World Group II.
At this third-tier, Europe/Africa zone Group I event in Bath, there were initially eight teams – split into two groups – taking part, with only GB progressing, having now eliminated Group B winners Serbia.
The hosts – who were without the experienced Heather Watson, who has been ill throughout the week – will now await Tuesday’s draw for the play-offs, which will be played on 20-21 April.
“Here’s to hoping for a home tie in April,” said Konta.
Among the seven teams Great Britain could face in the play-offs are Russia, who won the other Europe/Africa zone Group 1 event taking place this week in Poland. Brazil and Kazakhstan are also in the hat, while the other four teams will be determined on Sunday depending on results in World Group II.
BBC tennis correspondent Russell Fuller
Not for the first time, Johanna Konta’s resilience shone through. She appeared on the verge of retirement, and though underpowered on serve, composed a remarkable and clinical final set.
The British number one reported feeling light headed and shaky at the end of the second set, and likened it to a bit of an “out-of-body” experience. Whatever the cause, she handled the situation with enormous courage.
Katie Boulter also had a magnificent week – leading from the front as she made her debut in Fed Cup singles.
Saturday’s performance especially was full of heart. Boulter played four three set matches in St Petersburg last week, and after a couple of long matches in Bath, her fuel gauge was heading towards empty.
Boulter has made enormous strides over the past eight months, and happily seems to thrive on the pressure and expectations of team competition.
It was an excellent week, all round. Nearly 16,000 people bought tickets – a huge endorsement of the LTA’s decision to bid to host the event after 26 years of away ties.
It would almost be a shame if Britain is not in a position to hold the event again next February, although that long-awaited return to the elite level of the Fed Cup would be ample compensation.