Rafael Nadal lost his singles match but bounced back in the doubles to lead Spain into the semi-finals of the ATP Cup.

Belgium's David Goffin registered one of the biggest wins of his career when he shocked the world number one 6-4 7-6 (7-3) to level the tie at 1-1.

Despite struggling with the hot conditions, Nadal elected to come back out for the doubles alongside Pablo Carreno Busta, but Spain looked on the brink of defeat when Sander Gille and Joran Vliegen took the first set after a tie-break.

However the match, and the tie, dramatically swung back in Spain's favour at 5-5 in the second set when Nadal and Carreno Busta eked out a rare break point.

Belgium thought they had saved it but a video challenge showed Vliegen's racket was the other side of the net when he volleyed the winner so the break - and subsequently the set - went to Spain.

The match tie-break also went the way of Nadal and Carreno Busta, who ran out 6-7 (7-9) 7-5 10-7 winners to set up a semi-final against hosts Australia.

"It was tough," Nadal said in his on-court interview. "The conditions have been very heavy, and to play a big player like David in the singles and then the doubles was tough.

"Belgium have had a great week but we are just pleased to be in the semi-finals."

Roberto Bautista Agut had earlier given Spain a 1-0 lead when he beat Kimmer Coppejans 6-1 6-4.

Novak Djokovic led Serbia into the other semi-final, where they will face Russia, after edging past Canada's Denis Shapovalov 4-6 6-1 7-6 (7-4).

A titanic final set saw Shapovalov break the Wimbledon champion as he served for the match at 5-4 and then repel a break point at 5-5.

But Djokovic prevailed in the tie-break to give Serbia an unassailable 2-0 lead after Dusan Lajovic had beaten Felix Auger-Aliassime 6-4 6-2.