Rafael Nadal weathered an early barrage before beating Alex de Minaur 4-6, 7-5, 6-1 to clinch Spain's semifinal win over Australia and secure a spot in the inaugural ATP Cup decider against Serbia.
Second-ranked Novak Djokovic beat Daniil Medvedev 6-1, 5-7, 6-4 to secure Serbia's win over Russia in Saturday's earlier semifinal.
Top-ranked Nadal led Spain to the Davis Cup title at Madrid last November and is aiming to make it back-to-back triumphs in international team events. The 24-team ATP Cup is being staged for the first time.
Nadal endured the 20-year-old de Minaur's relentless attacking play for most of the first two sets until a significant momentum swing. After saving a break point at 5-5, he won six consecutive games to clinch the second set and take a 4-0 lead in the third.
He didn't want any repeats of the previous night, when he lost to David Goffin — just his second loss in a singles match since a semifinal defeat to Roger Federer at Wimbledon — and then didn't win the deciding doubles encounter against Belgium until after 1 a.m. in a match tiebreaker.
So after being broken by de Minaur, Nadal broke back immediately and then served out in 2 hours, 13 minutes in front of almost 9,500 people at Rod Laver Arnea.
Roberto Bautista Agut had earlier beaten Nick Kyrgios 6-1, 6-4 to give Spain the lead, and Nadal's ensured Spain's progression before the doubles.
It took some on-the-spot shot-making genius to get the captains and teams from both Serbia and Russia applauding earlier on Day 9, and to separate Djokovic from Medvedev in the first match of the tournament between two top-5 players.
Djokovic got the pivotal break in a long fifth game after a protracted rally ended in an exchange of volleys and drop shots. But Medvedev pushed him to the end, forcing Djokovic to produce some of his best tennis as he served for the match. The seven-time Australian Open champion saved three breaks points while serving for the match, including one with some genuine desperation — lunging to reach a volley, scrambling to get to a drop shot and then coming up with a makeshift forehand as he stretched back to get to deuce again.
It was the point that had the crowd and teammates of both players on their feet.
"Exciting, exhausting, joyful, dreadful all at once," Djokovic said when asked for his summation. "It was a lot of rallies and it was very exhausting. Very physical battle, but also mental battle ... some amazing points.
"Definitely one of the most exciting matches I've played against him or any of the top players in the last few years."
Dusan Lajovic beat Karen Khachanov 7-5, 7-6 (1) in the opening singles and Serbia also won the doubles to complete a 3-0 sweep.
Djokovic tried to get Medvedev moving, drawing him to the net with drop shots and slice and passing him with winners.
But the tall Russian worked out a way to counter it and won four games straight. starting by breaking Djokovic in a game that lasted more than 10 minutes and which he finally converted on his fourth break-point chance.
Medvedev, who won their previous two meetings and was 2-3 in career head-to-heads, got his first set point after Djokovic served a double-fault, and duly converted to level.
Despite showing signs of fatigue, Djokovic lifted his game in the third set to ensure he has one more singles match in Sydney. He withdrew Saturday from the Australian Open tuneup tournament in Adelaide next week.