Roger Federer won a hard-fought third round match at this year's French Open, but almost immediately announced his withdrawal saying that he is "listening to his body" and is not taking any risks.

The announcement of Federer's withdrawal was shared on social media a day after his four-set thriller against Dominik Koepfer. The 20-time Grand Slam champion advanced to the fourth round, but he revealed that he did not feel like it was wise to put his body through more intense matches.

The victory against Koepfer was challenging, and Federer was pushed much more than in the previous two matches. In the end, he pulled off a 7-6 (7-5) 6-7 (3-7) 7-6 (7-4) 7-5 victory but the match evidently took its toll.

"After two knee surgeries and over a year of rehabilitation it's important that I listen to my body and make sure I don't push myself too quickly on my road to recovery," Federer said.

pic.twitter.com/70C8RYr69J

— Roger Federer (@rogerfederer) June 6, 2021

"After discussions with my team, I've decided I will need to pull out of Roland-Garros today," he added, before saying that he was "thrilled" to have been back on court after winning three matches.

Before playing in the French Open, Federer had only played in three other competitive matches since recovering from two knee surgeries. He spent most of the past 16 months recovering and in rehabilitation before rejoining the tour earlier this year.

Roger Federer
Running on empty: Roger Federer playing against Germany's Dominik Koepfer in an empty Court Philippe Chatrier AFP / MARTIN BUREAU

Ahead of the French Open, he made it clear that he was not aiming to win the title at Roland Garros. Instead, he wanted to get back into active competition to prepare himself for Wimbledon. The event was cancelled last year due to the novel coronavirus pandemic, and Federer is eager to return to the event which has seen him lift eight trophies. He will likely join a warm up event before the Grand Slam starts on June 28.

In his earlier match against Marin Cilic, Federer was given a time penalty after taking too long to walk from one side of the court to another in order to access his towel. It was a clear sign that he still needed time to adjust to the new regulations brought about by the pandemic.

After Federer's withdrawal, his fourth round opponent Matteo Berrettini will have a walkover on Monday and is heading straight to the quarter-finals.

Matteo Berrettini
With Federer having withdrawn to rest his knees before Wimbledon, Italy's Matteo Berrettini has a free pass to the quarter-finals AFP / Anne-Christine POUJOULAT