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 to secure an unbeatable 2-0 advantage in the match.
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.
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.