Laura Robson and Heather Watson both claimed singles victories to help Great Britain beat Hungary and earn a Fed Cup Euro/Africa Group I play-off place.
Robson recovered from a disastrous first set and a problem with a shoulder injury, which needed the trainer to be called, to beat Greta Arn 0-6 6-2 6-1.
Watson swept past Timea Babos 6-3 6-2 before Robson and Johanna Konta lost in the doubles as the tie finished 2-1.
GB will now play Bulgaria in the play-offs on Sunday.
The winner will earn a World Group II play-off in April, which could be Britain's first home tie for 20 years.
Great Britain captain Judy Murray is predicting a difficult tie against Bulgaria, who will have former Wimbledon semi-finalist Tsvetana Pironkova in their team.
"We're anticipating a tough battle," said Murray.
"It was great to establish a winning lead after the singles against Hungary today although we got off to the worst possible start when Laura lost the first set 6-0.
"But she made a remarkable recovery to win in three and Heather found some of her best form to beat Timea Babos in straight sets."
After victories in their first two matches against Bosnia-Hercegovina and Portugal, British hopes of topping the group were high.
But Robson was out of sorts in the opening set against a player ranked 93 places below her at 138 in the world and needed some treatment at the end of the set for a problem with her left shoulder.
However, she found her rhythm after that and eased through the rest of the match for a 1-0 lead.
The 19-year-old later told British Tennis: "After the first set I thought, this can't get any worse. I regrouped and played better in the second and third sets."
British number one Watson had no such problems against Babos and wrapped up victory in 84 minutes.
"I'm really pleased I played better today, especially mentally," said Watson.
"I got off to a good start and even when she got back to 3-3 I kept up the pressure and the second [set] was easier.
"I'm very proud that we're through to Sunday's play-offs."
Hopes of a 3-0 victory were ended when Robson and Konta were beaten 6-4 2-6 6-2 by Reka-Luca Jani and Katalin Marosi.