Serena Williams saw her Fed Cup singles winning streak ended but the United States battled past Latvia to book their spot in April's Finals.
Williams, 38, was unbeaten in 14 matches but was defeated 7-6 (7-5) 3-6 7-6 (7-4) by Anastasija Sevastova.
That took the qualifying tie, which the US had led 2-0, to a decider after Jelena Ostapenko had beaten Australian Open champion Sofia Kenin 6-3 2-6 6-2.
Kenin and Bethanie Mattek-Sands won the deciding doubles rubber 6-4 6-0.
The US will be joined in April's inaugural 12-nation Finals in Budapest by Spain, Russia, Germany, Belarus, Switzerland, Belgium, and Slovakia, in addition to Australia, France, Czech Republic and hosts Hungary.
After the United States' dominant first day of the tie in Everett, Washington, 2017 French Open champion Ostapenko spearheaded Latvia's comeback, winning the first three games of the first set to take the early control.
Kenin, the 21-year-old who beat Garbine Muguruza to win the Australian Open earlier this month, broke Ostapenko's serve on three occasions in the second set to take the rubber to a decider, which itself saw six breaks of serve as the Latvian eased to the win.
Williams, who had been taken to two tie-breaks against Ostapenko the previous night, lost her first four service games and hit 30 unforced errors in the first set against Sevastova, who despite the American's battle back to a tie-break, clung on to take the opener.
The 23-time Grand Slam champion was more dominant in the second set, allowing Sevastova to hold just one service game, but lost the decider in another tough tie-break.
But despite Latvia's resolute performance, Kenin and Mattek-Sands proved too much for Ostapenjo and Sevastova in the doubles rubber, the US pair easing to victory in one hour 15 minutes.