Twenty-time Grand Slam singles champion Roger Federer said Wednesday he would be sidelined until 2021 after undergoing his second knee operation in a matter of months.

The 38-year-old Swiss said he needed follow-up arthroscopic surgery "a few weeks ago" after undergoing a similar procedure in February.

Federer, whose last Grand Slam win was the 2018 Australian Open, said he "experienced a setback during (his) initial rehabilitation."

"I plan to take the necessary time to be 100 percent ready to play at my highest level," the 38-year-old said in a statement on Twitter.

"I will be missing my fans and the tour dearly but, I will look forward to seeing everyone back on tour at the start of the 2021 season."

The announcement is likely to renew speculation about retirement for Federer, who holds the record for men's Grand Slam singles titles.

Federer, whose first major trophy was in 2003, lies just ahead of his fierce rivals Rafael Nadal (19) and Novak Djokovic (17) in the all-time list.