Roger Federer will not compete in the French Open for the third year running after announcing he will skip the entire clay-court season.

The 36-year-old made the announcement after he was knocked out of the Miami Open by Thanasi Kokkinakis – a qualifier ranked 175 in the world.

Federer, who won at Roland Garros in 2009, also pulled out of the tournament in 2016 and again last year citing the need to avoid playing on clay in order to prolong his career.

When asked in his post-match press conference if he would discuss the clay-court season with his team following the loss, the Swiss said: “I’ve decided not to play.”

Federer gave a curt response when asked to clarify whether he would also miss the French Open, adding: “Yes, that is what I said. Clay is the French (Open) as well.”

The 20-time Grand Slam winner appeared to be making his usual serene progress when he took a routine first set against 21-year-old Australian Kokkinakis.

But he was stunned as he dropped the second set and then lost a final-set tie-break, in the process losing his world number one ranking.

Kokkinakis had Federer wobbling in the second set when he broke in the fourth game, and had break points in the sixth, before going on to level the match.

A more animated Federer began exerting fierce pressure in the third but the Kokkinakis serve somehow held out to force a tie-break.

Kokkinakis then kept his nerve in a tense finale to seal a remarkable win, prevailing 3-6 6-3 7-6 (7/4) to reach the third round.

Rafael Nadal will reclaim the number one spot when the rankings are published after the tournament.