The former started the year ranked number 17 in the world while the latter was number nine, but both have worked their way up to number two and one, respectively. Federer and Nadal have equally shared the four Grand Slams between them, capturing other singles titles as well and have been closely matched throughout the campaign.
The two long-time rivals were very close in the point's standings for the top ranking and Federer looked to have the advantage following his win at Wimbledon in July. But a back injury during the Montreal Masters hampered his chase as he was forced to miss the Cincinnati Masters and was not fully fit during the US Open.
Nadal was crowned world number one despite losing early in Cincinnati and he went on to cement his place as the top-ranked player by winning the US Open as Federer crashed out in the quarter-finals. He enhanced his credentials to end the year as the number one further with two final appearances and one title during the Asian leg of the ATP tour in China.
Despite Federer's wins in Shanghai and Basel, Nadal remains 1,460 points ahead of the Swiss ace. The former has withdrawn from the ongoing Paris Masters, which gives Nadal the chance to confirm his place as the year-end number one with just one more match win.
The 36-year-old, who has won seven titles in 2017, has continually insisted that chasing the number one was not his priority but admitted that he would have liked to provide a sterner fight to Nadal.
However, Federer made it clear that the Spaniard deserved the honour as he has played a full schedule with the Basel event being his only break during the season, unlike the Swiss ace, who skipped the entire clay court swing of the campaign.
The Swiss tennis legend revealed that his next priority is winning the ATP Finals in London and a triumph in the English capital will make 2017 his most successful campaign in a decade.
"Ever since Rafa won the US Open, I knew it was going to be very, very difficult," Federer told The Wall Street Journal after his win in Basel.
"I wish I could have chased [No. 1] more — my only regret is that I couldn't have chased it more at Cincinnati and the US Open. That was a pity — but Rafa played a full schedule, and he deserves it. I'm OK with that.
"If I finish the season strong, and playing well at the World Tour final, I'll be so happy, regardless of the ranking," the 19-time men's singles Grand Slam champion added.