World number one Rafael Nadal overcame a surprise singles loss to help Spain beat Belgium and reach the ATP Cup semi-finals in Sydney.
Nadal fell to a 6-4 7-6 (7-3) defeat by David Goffin, which levelled the tie at 1-1 after Roberto Bautista Agut beat Kimmer Coppejans 6-1 6-4.
Nadal and Pablo Carreno Busta rallied to beat Sander Gille and Joran Vliegen 6-7 (7-9) 7-5 10-7 in the decisive doubles.
They will play hosts Australia next.
Earlier, Serbia beat Canada 3-0 to set up a semi-final meeting with Russia.
World number two Novak Djokovic had to fight back to beat Canada’s Denis Shapovalov and give Serbia an unassailable 2-0 lead before they also won the doubles.
Nadal struggled in his victory over Japan’s Yoshihito Nishioka on Wednesday and he again appeared sluggish against Goffin.
Goffin, ranked 11th in the world, saved eight of the 10 break points he faced and dealt well with Nadal’s forehand.
“The conditions have been very heavy, and to play a big player like David in the singles and then the doubles was tough,” Nadal said.
“Belgium have had a great week but we are just pleased to be in the semi-finals.”
Spain won the inaugural week-long Davis Cup finals in November, which was played in a similar format to the new ATP Cup.
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.”