Harriet Dart and Heather Watson put in stunning performances to keep alive Great Britain's hopes of reaching the semi-finals of the Billie Jean King Cup in Glasgow.
Dart upset world number 13 Paula Badosa 6-3 6-4 to put GB 2-0 up in the best-of-three Group C tie against Spain.
Earlier, Watson had beaten Nuria Parrizas Diaz in ruthless fashion.
Great Britain need to win the remaining doubles rubber to advance from a group where they had started as underdogs.
Alicia Barnett and Olivia Nicholls, who made their debuts in the competition on Tuesday, take on Aliona Bolsova and Rebeka Masarova in the doubles.
"I was so inspired by Heather's performance this afternoon, she played awesome," an emotional Dart said in her on-court interview.
"I just wanted to play half as good as she did and I think I put in a good performance today."
Dart stuns Badosa to set up doubles decider
Badosa is ranked 85 places above Dart but never found her quality in what seemed a tired performance.
She had played in singles and doubles in Spain's victory over Kazakhstan on Wednesday and was sucking on an energy gel as early as the changeover after the fifth game against Dart.
The Briton, meanwhile, was riding the momentum of Watson's win and broke in the opening game, later going a double break up. But she could not serve out the set as the errors crept in at a tense time, giving the game away with an overcooked shot.
She took her chance in the next game, keeping her focus when a challenge from Badosa showed the Spaniard had not double-faulted on set point. Badosa could do nothing with the lifeline she was handed, with Dart firing a powerful winner to seal the set.
Badosa's body language switched from fatigued to frustrated in the second set, kicking at the ball when under pressure in her opening service game. But the Spaniard held and Dart then needed a beautiful backhand winner to save break point in the next game before unleashing a running forehand to extinguish any threat.
Dart put herself a game away from victory by shrugging off a missed forehand volley to hold and then clinched victory on her first match point when Badosa netted a backhand, triggering wild celebrations as Britain put themselves one victory away from the semi-finals for the first time since 1981.
Team tennis brings out best in Watson
Watson had earlier put Great Britain in with a chance of what had been seen as an uphill challenge of reaching the semi-finals against much higher ranked opponents.
The 30-year-old, who did not play in Tuesday's opening group defeat by Kazakhstan, is her team's most experienced player in the competition with this her 34th appearance.
And in front of a home crowd, playing for her country, she was in her element as she quickly took charge of the match against Parrizas Diaz by winning seven games in a row on her way to a 6-0 6-2 win.
She had faced a challenge in a lengthy third game, having to fend off four break points but holding for a 3-0 lead.
Her belief grew, as did her ability to deliver delicately angled drop shots that the Spaniard could get nowhere near and she eventually sealed the first set when Parrizas Diaz went long.
Watson, ranked 61 places below her opponent at 133rd in the world but showing the kind of form that took her to the Wimbledon fourth round for the first time this year, got the key break to love in the sixth game of the second and did not waver in closing out the match.
"I was really happy with my level today, I played super aggressive and had so much fun out there," she said.
"I do love playing in this atmosphere. I have had my best Grand Slam results at Wimbledon and I love playing at home. It brings out the best in me.
"I love being part of a team, I'm naturally a team player. I enjoy playing for my country."