CNN  — 

Roger Federer has pulled out of this year’s French Open after undergoing knee surgery.

The Swiss star announced on his Twitter page that he had been dealing with pain in his right knee for a “little while.”

The 38-year-old underwent arthroscopic surgery in Switzerland Wednesday which will rule him out for the second grand slam of the season in Paris, France.

Federer will also miss a number of big tournaments before the Roland Garros event but is hopeful of returning in time for the grass court season later in the year.

“My right knee has been bothering me for a little while. I hoped it would go away, but after an examination, and discussion with my team, I decided to have arthroscopic surgery in Switzerland yesterday,” Federer said.

“After the procedure, the doctors confirmed that it was the right thing to have done and are very confident of a full recovery. As a result, I will unfortunately have to miss Dubai, Indian Wells, Bogota, Miami and the French Open. I am grateful for everyone’s support.

“I can’t wait to be back playing again soon, see you on the grass!”

The 20-time grand slam winner showed signs of injury during his last appearance at a grand slam at this year’s Australian Open in January.

He struggled with a groin injury during his monster quarterfinal against Tennys Sandgren and required off-court treatment during his straight-sets semifinal defeat by eventual champion Novak Djokovic.

roger on bjorn
Roger Federer muses on retirement planning
03:18 - Source: CNN

Federer, who won his only French Open title in 2009, missed the Paris tournament for three years from 2016 before returning to reach the semi finals last year. He then squandered two match points in losing an epic Wimbledon final to Djokovic the following month.

Visit CNN.com/sport for more news, features, and videos

Spain’s Rafael Nadal, who has already won the tournament 12 times, will equal Federer’s record number of grand slam victories if he is able to claim his 13th title in the French capital.

Djokovic sits three behind Federer with 17 titles following his victory in Melbourne.

The French Open runs from May 24 to June 7.