Both men have something to prove in the final after overcoming Marin Cilic and Juan Martin del Potro in semi-finals respectively.
Shanghai Masters: World No 1 Rafael Nadal meets his old sparring partner Roger Federer in another final in a match-up that never gets old
They have dominated 2017 so it is perhaps no surprise that it will be Rafael Nadal and Roger Federer duking it out for victory in the Shanghai Masters final on Sunday.
Given both men had started the year outside the top five, with Nadal at No 8 and Federer No 16, their rivalry stopped being a surprise a long time ago.
Nadal went to No 1 for the first time in three years in August, with Federer his nearest challenger, after a year in which both men have turned their respective clocks back to establish themselves back at the top of the game.
- How Rafael Nadal got from No 9 to No 1 in eight months
- Nadal has Federer breathing down his neck but should be proud of being No 1
They locked out the four grand slams between themselves for the first time since 2010 with Federer winning the Australian Open and Wimbledon, Nadal the French and US Opens.
Sunday's showdown in Shanghai will be the 38th time they have met in an ATP-sanctioned match, the 24th time when a trophy has been at stake. Nadal defeated Cilic in straight sets 7-5, 7-6 to book his spot in the final, while Federer came from a set down to defeat Juan Martin del Potro 3-6, 6-3, 6-3.
There is more than just the title at stake in Shanghai though. If Federer has any realistic ambitions of taking the No 1 spot for himself before the end of the year then he needs to prevail in China
At present Nadal's ranking points tally of 9,875 is 2,370 more than Federer's. If Federer triumphs he will score the maximum 1,000 points, gaining 400 on Nadal, who will get 600 for being runner-up.
That would still give him an outside, and very unlikely, chance of taking the top spot still before year's end. Federer would need to win the Paris Masters and then the ATP World Tour Finals in London, with a maximum 2,500 points available and also need Nadal to basically not win another match for the rest of this year to facilitate that scenario.
More realistically, Federer will keep his focus on winning a sixth title of 2017 as he continues his renaissance after knee surgery last year had hinted that his best days were behind him.
Nadal, too, has struggled with injuries, which had looked to be wearing his body down, and 12 months ago he wrapped up his season early to allow himself to recover from wrist problems after losing in his opening match in Shanghai to Victor Troicki. Fast forward to now and the Spaniard goes into his showdown with Federer on a 16-match winning streak.
His form on the hard courts going into the US Open had looked ordinary as he lost to Denis Shapovalov in Montreal and Nick Kyrgios in Cincinnati, but he grew in confidence in New York.
It helped that he did not play anyone inside the top 20 on his way to winning the US Open, but he got better as the tournament went on and he has kept that momentum by taking the Beijing title last week and now being in the Shanghai final.
Federer is an interesting measuring stick of just how well Nadal is playing. The Swiss has won their three encounters this season, including the Australian Open final in January.
Federer was the form man of the first seven months of the year, winning five of the seven tournaments he entered.
He wisely chose to sit out the clay-court season, which is where Nadal's year kicked in. The Spaniard won 24 out of 25 matches to claim five titles, the last of which at Roland Garros was his first grand slam in three years.
It was Federer's choice to miss those events. He was not injured. He just chose to look after his body and rest up and target Wimbledon on grass, a tournament he had a much better chance of winning, which proved to be the case as he won it without dropping a set.
Nadal deserves to be No 1 as he has played the full year. He has not been tactical with where he has played. He has six titles to his name.
It has been a great year for him but he has not beaten Federer this year.
Considering the hard work Federer made of beating Richard Gasquet in the quarter-finals on Friday and then Del Potro on Saturday this is a great chance to do that.
You have to go back to January 2014 for the last time Nadal beat Federer, though he still leads their head-to-head 23-14.
Federer has not won a title since Wimbledon and will want to reassert his authority, while Nadal can underline his superiority at the top of the game by beating his arch-rival.
It will be a fascinating encounter with the tennis public once again being the winner.