Katie Boulter had put Great Britain ahead in the tie with her victory in the opening singles rubberFed Cup: Group I Europe/Africa ZoneVenue: University of Bath Dates: 6-9 February 2019Coverage: BBC website will have live text commentaries on selected GB matches
Great Britain moved a step closer to Fed Cup promotion after Katie Boulter and Johanna Konta's gruelling three-set wins sealed victory over Hungary.
Boulter battled through a thriller against Dalma Galfi 6-4 6-7 (5-7) 7-6 (7-1) in the round-robin event in Bath.
Konta then overcame world number 224 Anna Bondar 6-2 6-7 (1-7) 7-6 (7-4) to ensure the hosts finish top of Group A.
They will face Group B winners Serbia on Saturday (16:30 GMT) for a place in April's promotion play-offs.
Victory over the Serbs - who beat Croatia earlier on Friday - would put Britain in the World Group II play-offs for a third year in a row.
Konta clinched a nervy third-set tie-break with her first match point as Bondar missed a forehand.
That brought an end to the match after two hours 42 minutes, with the capacity crowd at the University of Bath erupting as the clock ticked beyond 23:00 GMT.
"The reason why I was on the ropes was because of the way she was playing. She played amazing tennis," Konta said.
"I am very fortunate to have come through that. If anything, I think it was my experience which got me through."
Konta given huge scare by world number 224Anna Bondar (left) pushed Johanna Konta hard with some inspired serving that included 15 aces
After Boulter's gripping triumph, British number one Konta broke twice to take her first set after just half an hour and appeared set for a comfortable victory.
But - despite being ranked 185 places higher than her 21-year-old opponent - former Wimbledon and Australian Open semi-finalist Konta was then frustrated by Bondar's powerful serve.
Konta had nine chances to break in the second set but could not take any of them and was then punished by the stubborn Hungarian in the tie-break.
But the Briton battled back from 3-1 down in the third set and then survived three break points at 4-4 in the decider, before another escape at 5-5, with her punchy groundstrokes saving the day.
"She was playing well so I had to remember that and to not judge myself too harshly, and try to break her rhythm as much as possible," Konta said.
"I am just happy I followed on from Katie as she is doing incredibly well. It is another opportunity we have given ourselves and we will go into tomorrow [Saturday] and put it all out there like we have done so far."
Her victory meant the tie was wrapped up without Great Britain needing to play the doubles rubber.
Boulter thrives in the big points late onKatie Boulter made a quick start to her match by going two breaks up in the first 12 minutes before being pegged back
Boulter and world number 311 Dalma Galfi arrived at their enthralling match with 100% singles records so far this week, although the in-form 20-year-old Hungarian had required just four sets to overcome Greece's Valentini Grammatikopoulou and Slovenia's Kaja Juvan.
Yet Boulter - seemingly unfazed by the responsibility of leading out the hosts - put in another mature display in the first set and looked set for a relatively routine win.
However, a fearless Galfi defied her world ranking to strike back, taking control of the second-set tie-break and moving a break up in the third, before 22-year-old Boulter found the strength to hit back.
In the decisive third-set tie-break, Boulter took the initiative, moving into a 5-0 lead and then setting up five match points. Serving at 6-1, she needed just one of them, as Galfi sliced a forehand return wide.
"My whole heart, I put on that line there," Boulter said after coming through in two hours 22 minutes.
"It means so much for me to play for my country."
Speaking to BBC Radio 5 live she added: "Every match, I try as hard as I can. I'm a fighter - that's who I am.
"I think I've proven that in the past couple of days. It's been a really good week for me."
Can Great Britain finally return to World Group?
Britain have played outside the Fed Cup's top two tiers since 1993 but are bidding to reach the World Group II play-offs for a third successive year.
They have won three ties in three days to top their group, but they still need to win two more consecutive fixtures to be promoted, with Group B winners Serbia lying in wait on Saturday, before April's play-off.
At this third-tier, Europe/Africa zone Group I event in Bath, there were eight teams - split into two groups - taking part, with only the group winners meeting for a chance to progress.
Serbia overcame Croatia on Friday morning to finish top of Group B and - like GB - have three wins from three so far.
The Serbs will go into Saturday's tie having had around six hours more rest than the British team after another late finish in Bath.
Great Britain will still be without the experienced Heather Watson, who has been ill this week, but captain Anne Keothavong believes Boulter and Konta can inspire more success.
"Coming through matches 7-6 in the third will do both their confidence a world of good. They'll be running high on adrenaline," she said.
"We have a good medical support team who will be doing their best right now to ensure Jo and Katie are fit and ready to go again tomorrow."
Analysis
BBC tennis correspondent Russell Fuller
At the start of the week, it looked as if Croatia would be the team to avoid in Saturday's play-off.
Their number one Donna Vekic is the highest ranked player in Bath, but it was Serbia's greater strength in depth which proved decisive in Group B.
Both Aleksandra Krunic, who beat Johanna Konta at the 2017 US Open, and Olga Danilovic won their maiden WTA titles last year. The three players they have featured are all ranked inside the world's top 120.
Katie Boulter and Johanna Konta are certainly battle hardened, having come through some very tough scraps with a 100% record.
Stamina can often be an issue as the players approach a fourth tie in as many days. Konta's last two matches have both lasted exactly two hours and 42 minutes, but unlike the Serbs, neither she nor Boulter have yet been called upon to play the doubles.