Rafael Nadal will end 2017 as world number one after a second-round win over Hyeon Chung at the Paris Masters.
The Spaniard, who has risen from ninth at the start of the year via French and US Open victories, advanced 7-5 6-3 in one hour and 48 minutes.
"It was impossible for me to think about when you are coming back from a tough time, without playing tennis and with so many injuries," he said.
Nadal, 31, will play Uruguay's world number 36 Pablo Cuevas in the last 16.
The 16-time Grand Slam champion did not have it all his own way in a see-sawing first set in which he and Chung exchanged two breaks apiece before Nadal broke to love in the final game.
South Korea's Chung, 21, held his own in the second set but again crumbled in the latter stages, surrendering to love to give up the solitary break.
Nadal is 1,460 points clear of Swiss world number two Roger Federer in the world rankings and victory over Chung ensured him an unassailable lead before the World Tour Finals in London later this month.
It seemed an unlikely scenario at the end of last season when the left-hander withdrew from the French Open and missed Wimbledon with a wrist injury that then brought his season to an early end in October
Nadal, who also finished 2008, 2010 and 2013 at the top of the rankings, is the oldest player to finish a campaign at world number one since they were introduced in 1973.
Andy Murray, who was 2016's season-end number one, is third with 20-year-old Alexander Zverev fourth.