Rafael Nadal

Rafael Nadal has pulled out of next week's season-ending ATP Finals in London and was to undergo ankle surgery on Monday.

The Spaniard, who has just been dislodged as world No. 1 by Novak Djokovic, has an abdominal problem which prevents him from playing at the November 11-18 Finals featuring the season's top eight players.

He has instead taken the opportunity of undergoing arthroscopic surgery to remove a free particle in his right ankle joint.

The 17-time Grand Slam winner had been due to play his first match since the US Open semi-final at the Paris Masters last week, but pulled out due to the abdominal injury.

Nadal said via Twitter and Facebook that as the injury would now prevent him playing in London he had decided on the ankle surgery.

"I have done everything possible to reach the end of the season in good condition, both in Paris and London, doing things well and I really wanted to play," Nadal posted in Spanish.

"Unfortunately I had the abdominal problem in Paris last week and, in addition, I have a free body in the ankle joint that has to be removed in the operating room today.

"It is true that we had detected it for a long time and from time to time it bothered me. However, since the problem in the abdominal muscle also prevents me from playing in London, we take advantage of the moment to remove the free body and avoid future problems.

"In this way I hope to be in full condition for the next season."

Nadal's decision means Djokovic will end the season topping the ATP rankings in a remarkable comeback for the 31-year-old Serb.

Djokovic has returned to the world No. 1 spot for the first time in two years in what is now his fourth stint leading the rankings.

Following injury, he had fallen to 22nd on May 21, and now becomes the first player to be ranked outside the top 20 then climb to No. 1 in the same season since Marat Safin in 2000.

Nadal had meanwhile planned to return to Paris for last week's Masters after the knee injury that forced him to retire in the semi-finals of the US Open against Argentine Juan Martin del Potro on September 7.

He will now have to wait until 2019 to try to return in full form after a year which was as successful as it was plagued by physical problems.

Nadal played just nine tournaments in the year, in addition to the Davis Cup against Germany in April. He won his 11th title at Roland Garros and also lifted the Masters 1000 Monte Carlo, Rome and Toronto, but had to leave both the Australian and US Open due to injury.

"It has been a complicated year, very good at the tennis level when I was able to play, and at the same time very bad as far as injuries are concerned," he said in his social media statement.