Top-ranked Rafael Nadal has withdrawn from the Swiss Indoors next week, denying fans a possible final against Roger Federer.

Nadal says he's taking medical advice to protect "over stressing of the [right] knee."

He says the injury affected him last week in Shanghai, where he lost the final to Federer in two sets.

Federer's win over Nadal was a fifth straight against his longtime rival. That streak started in Basel in 2015 when Federer won the final of his hometown tournament.

In Nadal's absence, the No. 2-ranked Federer will be top-seeded as he seeks an eighth Basel title.