EVERETT, Wash. -- Australian Open champion Sofia Kenin was hoping to not have to take the court again after falling short in her singles match.
"I was cheering Serena on very loud. ... I was really nervous for you," Kenin said. "I was super excited. This is why we play, moments like these, and these moments we can remember forever.''
It was a more challenging day than expected for the Americans, who held a 2-0 lead entering the second day of singles matches. But Ostapenko beat Kenin in three sets, and Sevastova followed with a stunning, three-set victory over Williams.
Kenin took the place of Alison Riske in doubles and played her third match in barely 24 hours. Although she might have looked fatigued in her three-set loss to Ostapenko earlier in the day, Kenin found a boost teaming with the energetic Mattek-Sands and clinched the Americans a trip to Budapest, Hungary, for the finals in April.
"The last match of the day, you don't know if it's going to count for something or if it's all coming down to it," Mattek-Sands said. "I'm ready for both. I've been in both situations.''
The doubles deciding the meeting was a surprise after both Kenin and Williams won on the opening night. Even after Kenin lost Saturday's opening match, there was still Williams' 14-0 mark in singles in her Fed Cup history.
But Sevastova ended Williams' unbeaten run. She won 7-6 (5), 3-6, 7-6 (4) to avenge a loss to Williams in their only previous meeting, in the 2018 US Open semifinals, when Sevastova won only three games.
This time, it was Sevastova celebrating at the end, after she closed the match with a huge serve Williams couldn't return.
Williams had been unbeaten in singles, dating to her debut in 1999, including a straight-sets win over Ostapenko on Friday that included two tiebreakers.
"It's obviously hard to play Serena, and she's an amazing champion,'' Sevastova said. "You just try and enjoy it as best you can and give your best.''
Williams had chances to clinch a victory for the U.S. and wrap up its spot in the finals. She rallied from a 5-2 deficit in the opening set by winning four straight games and had three set points with Sevastova serving. But the Latvian managed to hold serve, thanks to a couple of errors by Williams and a pair of aces.
Williams broke the serve of Sevastova four times in the second set, but couldn't find the same success in the final set, as the players held serve into the tiebreaker. Williams pulled even at 4-all, but Sevastova won the final three points and the match.
"It was a really intense match. I feel it was lots of points, lots of running, lots of things and lots of things to take out of the match for the future,'' Williams said.
Ostapenko beat Kenin 6-3, 2-6, 6-2 to give Latvia its first point. Ostapenko broke Kenin four times in the third set as the former French Open champion outlasted the most recent Grand Slam winner.
Kenin struggled with Ostapenko's power before adjusting to dominate the second set, but she couldn't hold serve in the final set.
The pair exchanged breaks in the first three games of the third, leaving Ostapenko with a 2-1 lead. She nearly gave the advantage back to Kenin, but Ostapenko saved a pair of break points to take a 3-1 lead on a swinging forehand volley.
Ostapenko broke Kenin for the third time in the set for a 4-1 lead but gave a game back to the American with a double fault.
Again, Kenin couldn't hold. Ostapenko's forehand winner gave her a 5-2 lead, and she closed the match in 1 hour, 58 minutes.
The big-hitting, former French Open champion gave Williams all she could handle in the second singles match Friday, losing because of errors in both tiebreakers. Ostapenko still had plenty of errors against Kenin -- 49 unforced -- but she also had 34 winners, compared to just 13 for Kenin.
"It's always very special to play for my country, and I was just trying my best today,'' Ostapenko said. "Until the last point, I knew it was going to be a very tough match, and I was trying to play aggressive.''