Roger Federer is going to miss the US Open and be sidelined for what he said will be “many months” because he needs a third operation on his right knee, a procedure he said will leave him with “a glimmer of hope” that he can return to competition.

Federer announced the news Sunday via a video message on Instagram.

“I’ve been doing a lot of checks with the doctors, as well, on my knee, getting all the information, as I hurt myself further during the grass-court season and Wimbledon,” Federer said. “Unfortunately, they told me for the medium to long term, to feel better, I will need surgery, so I decided to do it. I will be on crutches for many weeks and then also out of the game for many months.”

Federer, 40, who has 20 Grand Slam singles titles to share the men’s record with Rafael Nadal and Novak Djokovic, acknowledged there was a chance his playing career could be over, but he said he would rehab the knee with the goal of making another comeback.

“I want to be healthy. I want to be running around later, as well, again, and I want to give myself a glimmer of hope, also, to return to the tour in some shape or form,” Federer said. “I am realistic, don’t get me wrong. I know how difficult it is at this age right now to do another surgery and try it.”

Federer missed more than a year of action after first having his knee repaired shortly after the 2020 Australian Open in February of that year. He had a follow-up procedure that June.