Sydney: Novak Djokovic was at his battling best to topple gutsy fifth-ranked Daniil Medvedev on an epic Saturday and send Serbia into the inaugural ATP Cup final.
The world number two was given the ideal platform by a composed Dusan Lajovic, who ground down Russia's Karen Khachanov in the opening singles 7-5, 7-6 (7/1) to hand his country a 1-0 advantage.
And the 16-time Grand Slam champion, who will be targeting an eighth Australian Open title this month, came through a top-draw contest 6-1, 5-7, 6-4.
It gave Serbia an unassailable 2-0 lead ahead of the doubles to set up a meeting with either the Nick Kyrgios-led Australia or Rafael Nadal's Davis Cup champions Spain in the final on Sunday.
"It was an exceptional match. Lots of rallies and very exhausting. Daniil Medvedev is one of the best players in the world and he showed today why," said Djokovic, who on Saturday pulled out of next week's Adelaide International after a tough ATP Cup.
"He's difficult to break from the baseline, he's tall and has a good serve. This was the most difficult challenge I have had so far this year."
Djokovic dropped a set for the first time in the tournament during his quarter-final encounter with Canada's Denis Shapovalov, but quickly assumed control against Medvedev.
Playing in much cooler conditions than the heat and humidity that hit Nadal on Friday when he lost in the singles, Djokovic broke in the first set to go 3-1 up and never looked troubled.
He broke again for 5-1 and served it out in just 31 minutes.
The Russian, who had won their last two encounters, appeared in trouble when he was broken again in the opening game of the second set but then astonishingly roared back.
He lifted his level to create four break points in the next, converting when Djokovic misjudged a ball he thought was going out.
Another break put him 3-1 ahead and Djokovic smashed his racquet in frustration as Medvedev took the set to level the match.
A third set of long, high-quality rallies went with serve until Djokovic got the crucial edge in the fifth game, converting a volley to go 3-2 in front and Medvedev had no answer.
Lajovic, who won his first ATP title last year at Umag, took a 2-0 record into his showdown with world number 17 Khachanov.
In their first meeting on hard courts, he produced a performance that belied his ranking of 34, displaying composure and a fine array of shots.
Lajovic found a new gear during his thrashing on Friday of Felix Auger-Aliassime and said the vocal Sydney fans had fuelled him to deliver his best tennis.
They were back in full voice again at the Ken Rosewall Arena, getting him over the line.
"It was definitely one of the toughest matches for me in my career, concerning the situation, the tension and the importance of the moment," he said.
"But the crowd carried me and my team was behind me."