Novak Djokovic celebrates after Serbia beat Spain in the ATP Cup final ©Getty Images

Novak Djokovic got the better of fellow tennis heavyweight Rafael Nadal as Serbia beat Spain 2-1 to lift the inaugural ATP Cup title in Sydney.

The world number two beat the world number one 6-2, 7-6 as the first-ever final was graced by two of the sport's greats at Ken Rosewall Arena.

Sixteen-time Grand Slam champion Djokovic needed to win as Spain had taken the opening rubber thanks to Roberto Bautista Agut's 7-5, 6-1 win over Dusan Lajovic.

Bautista Agut moved to a record of six wins and no defeats at the ATP Cup but was forced to watch on as Serbia turned the final around.

Djokovic returned for the decisive doubles less than an hour after the singles clash but Nadal, surprisingly, did not.

Pablo Carreño Busta and Feliciano López were Spain's selections but they were rolled aside 6-3, 6-4 by Djokovic and Viktor Troicki.

"I'll remember this experience for the rest of my life as definitely one of the nicest moments in my career," Djokovic said. 

"I've been very fortunate and blessed to have an amazing career the last 15 years, but playing for the team, playing for the country with some of my best friends for a long, long time, you can't match that. 

Serbia won the decisive doubles rubber to win the tournament ©Getty Images
Serbia won the decisive doubles rubber to win the tournament ©Getty Images

"That's just too special."

Troicki added: "I want to thank Novak for playing with me again. 

"It was a great experience like always. 

"I remember playing with him since we were nine, 10. 

"To share such a moment on the court with him, I cannot describe it with words." 

Spain were hoping to add the ATP Cup title to the Davis Cup crown they won on home soil in Madrid in November. 

The ATP Cup is seen as a new rival to the traditional men's team tennis event, which was last year held with 18 teams across a single week for the first time.