Novak Djokovic fought back to beat Canada's Denis Shapovalov and ensure Serbia reached the ATP Cup semi-finals.
World number two Djokovic rallied to beat Shapovalov 4-6 6-1 7-6 (7-4) and give Serbia an unassailable 2-0 lead in the tie after Dusan Lajovic beat Felix Auger-Aliassime 6-4 6-2.
Serbian pair Viktor Troicki and Nikola Cacic then beat Peter Polansky and Adil Shamasdin 6-3 6-2 in the doubles to secure a clean sweep in Sydney.
They will play Russia in the last four.
Australian Open champion Djokovic has won all of his singles rubbers at the ATP Cup but was made to work hard by Shapovalov.
Shapovalov, who has beaten top-10 players Stefanos Tsitsipas and Alexander Zverev at the tournament, broke Djokovic in the penultimate game of the first set before serving it out.
However, Djokovic blasted through the second, converting all three of his break opportunities to force a decider.
Djokovic served for the match at 5-4 in the third set and had a 30-0 lead when a spectator was taken ill in the stands and play was halted.
The Serb gave the fan a bottle of cold water as she was escorted out of the stadium but he lost the next four points when play resumed and Shapovalov broke back.
Shapovalov saved four match points, including two off the Djokovic serve, but the Canadian sent a forehand long as Djokovic secured victory in two hours and 41 minutes.
"This was the closest match I have ever played against Denis. It was so close, it could have gone a different way easily," Djokovic said.
"He was playing some terrific tennis and I want to give a huge round of applause and credit to him."
Spain will play Belgium later on Friday, with the winner playing hosts Australia in the second semi-final.