Roger Federer
Roger Federer won't go for Olympic gold in Rio next month. Getty Images

Roger Federer has battled injuries for much of 2016, but his most recent ailment will force him to miss a significant amount of time. The world No. 3 tennis will miss the rest of the year because of a knee injury and it may mean his hopes of winning another Grand Slam are over.

The injury means Federer will be forced to sit out the Rio Olympics, as well as the U.S. Open. The Swiss legend hasn’t played since losing to Milos Raonic in the Wimbledon semifinals. Federer won't have surgery on the knee, but the rehab means he will miss significant time.

“I’m extremely disappointed to announce that I will not be able to represent Switzerland at the Olympic Games in Rio and that I will also miss the remainder of the season,” Federer said on his Facebook page. “Considering all options after consulting with my doctors and my team, I have made the very difficult decision to call an end to my 2016 season as I need more extensive rehabilitation following my knee surgery earlier this year. The doctors advised that if I want to play on the ATP World Tour injury free for another few years, as I intend to do, I must give both my knee and body the proper time to fully recover."

After losing to Novak Djokovic in the semifinals of this year’s Australian Open, Federer missed more than two months after undergoing knee surgery. He returned at the Monte-Carlo Rolex Masters, where he was bounced in the quarterfinals. Federer never looked to be his old self in the following tournaments, and he withdrew from the French Open. After three consecutive semifinal finishes, he decided to shut it down for the year.

Federer reached the finals of the last two Grand Slams in 2015, but his recent injury could be the beginning of the end of his run as a top player in the sport. He’ll be 35 years old upon his return in 2017, marking nearly five years since his last Grand Slam victory.

Federer, however, is confident that he can return at the top of his game.

"The silver lining is that this experience has made me realize how lucky I have been throughout my career with very few injuries,” he said. “The love I have for tennis, the competition, tournaments and of course you, the fans remains intact. I am as motivated as ever and plan to put all my energy towards coming back strong, healthy and in shape to play attacking tennis in 2017.”

After winning Wimbledon in 2003, Federer won at least one Grand Slam in each year through 2012. Before missing both the French Open and the upcoming U.S. Open this year, Federer had participated in every Grand Slam since 1999.