Roger Federer announced his withdrawal from the French Open over the weekend, but the 39-year-old's decision wasn't without controversy.

The French Open was Federer's first grand slam after two knee operations last year and only his third tournament since the 2020 Australian Open. Federer conceded in the lead-up to the tournament that he wasn't expecting to win and instead was focusing on Wimbledon, where shorter points and potentially slower courts give him his best shot at winning grand slam number 21.

"After discussions with my team, I've decided I will need to pull out of the French Open today," Federer said in a statement posted on Twitter.

"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 floated the idea of his withdrawal in his post-match press conference after his three-hour and 35-minute, four-set win over German Dominik Koepfer.

"We go through these matches … we analyse them highly and look on what's next and we'll do the same tonight and tomorrow." Federer said.

"Because I need to decide if I keep on playing or not, or is it not too much risk at this moment to keep pushing, or is this just a perfect way to just take a rest."

The 20-time grand slam champion withdrew less than 24 hours later, drawing criticism from doubles legend Patrick McEnroe.

“I understand it, but I don't like it. It's just not a great look to pull out of a tournament in the middle," McEnroe told the New York Times.

“It's one thing if you sprain an ankle badly and finish a match on adrenaline. Those things happen. But it's another thing when you kind of go into a tournament knowing that you probably aren't going to be able to really finish the tournament.

“Roger can't expect that he's going to play the French Open and not have some physically demanding matches in the first three or four rounds. That's kind of inevitable.

“Look, he's trying to get himself ready to make a run at Wimbledon, which I believe he's done. And a lot of people say he's Roger Federer. He can do whatever he wants. He's earned this right, and I understand that, but I still don't like it.”

Koepfer, currently ranked 59 in the world, would have banked an extra $89,621AUD for progressing to the fourth round after a chaotic 2020 season that saw players compete and earn less.

Former world no.1 Andy Murray defended Federer's decision in a series of social media posts after the announcement.

"In basketball, football etc, when returning from injury players are given reduced minutes to build up their fitness," Murray tweeted.

"In tennis you don't have that luxury of just playing a set in first match then two sets the next [match] etc and building up that way."

Matteo Berrettini, who was due to face Federer in the fourth round, will now play world no.1 Novak Djokovic in the quarter-finals as the tournament enters it's second week.

Federer is scheduled to play the Halle grass court lead-up tournament beginning next week before Wimbledon gets underway on June 28.