Serbia and Spain both prevailed in the ATP Cup to set up a dream final that could see Novak Djokovic face Rafael Nadal.
Having won all three matches of their quarter-final tie with Canada in the quarter-finals, Serbia again remained unbeaten versus Russia, while Spain dispatched hosts Australia with successive singles wins.
Reigning Australian Open champion Djokovic came through an engrossing three-setter with US Open finalist Daniil Medvedev .
Djokovic had lost his last two meetings with Medvedev, who threatened a comeback in Sydney after he recovered from a hugely disappointing first set to force a decider.
The world number two struck the ultimately decisive break in the fifth game of the third. However, typically obdurate to the end, Medvedev had three break-back points before Djokovic finally took his second match point.
It finished, fittingly, with the type of lengthy baseline rally that defined a captivating contest, Medvedev firing a cross-court forehand into the net to give Serbia an unassailable 2-0 lead with a 6-1 5-7 6-4 victory.
Earlier Dusan Lajovic beat Karen Khachanov 7-5 7-6 (7-1), and Serbia also came through in the dead rubber doubles clash as Nikola Cacic and Viktor Troicki defeated Teymuraz Gabashvili and Konstantin Kravchuk.
Paying tribute to Medvedev, Djokovic said of the match: "[It was] exciting, exhausting, joyful, dreadful all at once. At one point we both refused to miss from the baseline, so it was a lot of rallies and it was very exhausting. A very physical battle, but also a mental battle.
"He showed why he's one of the best players in the world, why he's top five. This kind of consistency and this kind of solid game from back of the court, big serves, got him to where he is. He deserves to be there.
"[It was] definitely one of the most exciting matches I have played against him or any other top player in the last few years."
World number one Nadal was similarly tested by Alex de Minaur , whose energy and intensity had the home crowd in Sydney on their feet as he took the first set in his quest to level the tie after Roberto Bautista Agut easily beat Nick Kyrgios 6-1 6-4 .
US Open champion Nadal did not have a break point until the 12th game of the second, but he took it to force a decider and subsequently raced away to claim a 4-6 7-5 6-1 success.
Wary of the obvious threat posed by Djokovic and Serbia in the final, Nadal said on court: "It's going to be a super tough final against Serbia.
"Novak likes to play here and Serbia has a great team and is playing very well. But Roberto played an amazing match this afternoon and we have a good team, so we are ready for it."