SYDNEY (Reuters) – World number one Rafael Nadal won a battle of attrition against fellow left-hander Yoshihito Nishioka of Japan 7-6(4) 6-4 to seal Spain’s spot in the final eight of the inaugural ATP Cup in Perth on Wednesday.

Meanwhile his long-time rival, world number two Novak Djokovic, had an easier outing in Brisbane, strolling past Chile’s Cristian Garin 6-3 6-3 to stay undefeated in the new year and to ensure Serbia will travel to Sydney for the knockouts having won all three of their .

Nadal had to twice fight back from a break down against the Japanese world number 72 in the opening set before winning the tiebreaker. The Spaniard broke his opponent’s serve to go up 5-4 in the second before holding serve for victory.

“It’s the first day I was playing under such heavy conditions, two previous days I had played in the night. The feeling on court was completely different,” Nadal said in an on-court interview.

“I played against an opponent who started the season on fire, winning two matches against two great players with very comfortable . Today was a very, very tough one.”

It was Nadal’s third singles win in the $15 million ATP Cup, which features 24 nations competing in Perth, Brisbane and Sydney over 10 days.

All six group winners and the two best second-placed teams will advance to the final eight stage in Sydney. Hosts Australia, Serbia, Britain, Russia, Spain and Argentina qualified as the six group winners.

In a winner-takes-all tie between the Argentines and Croatia, Guido Pella defeated 2014 U.S. Open champion Marin Cilic 7-6(1) 6-3 before Diego Schwartzman swept aside the challenge from Borna Coric to win 6-2 6-2 and ensure the Latin Americans will stay in Sydney.

France and Africa split their singles rubber, which eliminated both sides from contention.

Belgium clinched a place as one of the best second-placed teams while Canada took the final spot for the knockouts.

Earlier, Garin broke Djokovic in the second set to go up 3-1 but it seemed to bruise the seven-times Australian Open winner’s ego as he won the next five games to complete victory.

“Sydney’s got a big Serbian community, hopefully the support can be as good as it was here, even better,” Djokovic said.

Poland’s Hubert Hurkacz also picked up his third singles win of the tournament with an upset 3-6 6-4 7-6(5) win over Austrian world number four Dominic Thiem in Sydney. The world number 37 had earlier defeated Schwartzman and Coric.

It was the second loss in the new season for Thiem, who also to Coric in his opening match.

(Reporting by Sudipto Ganguly in Mumbai; additional reporting by Shrivathsa Sridhar in Bengaluru; Editing by John Stonestreet, Robert Birsel and Pritha Sarkar)