PARIS - Rafael Nadal's injury-plagued season is all but over after the Spaniard underwent surgery on a hip muscle which will keep him out of action for an estimated five months, his representative said on Saturday.

The 14-times French Open champion, who has won a men's joint-record 22 majors, has been out of action since January after hurting his hip flexor in a second-round defeat by Mackenzie McDonald at the Australian Open.

"Rafa will begin his progressive functional rehabilitation in a few hours," Nadal's representative Benito Perez-Barbadillo said in a statement.

"The normal recovery process is estimated at five months, always taking into account respecting the biological times of said structure."

Nadal marked his 37th birthday in hospital on Saturday, rather than at the French Open, where his presence has been hugely missed by fans at Roland Garros this year.

Nadal has also said that 2024 is likely to be his last year as a professional player and his doctor Angel Ruiz-Cotorro told Reuters on the sidelines of the Grand Slam that he expected the former world number to make a comeback.

"I expect Rafa will recover perfectly in the time necessary or maybe even less," Ruiz-Cotorro said. "It will depend on the evolution. There are different processes in this injury.

"First of all it's a little rest but we will begin some rehabilitation and after six weeks we will see what happens... and then obviously he'll start playing tennis very slowly."

Nadal was initially expected to be out of action for eight weeks after suffering the injury but it ended up decimating his season.

In March, Nadal fell out of the top 10 in the world rankings for the first time since 2005 and is now 15th.

(Reporting by Julien Pretot and Shrivathsa Sridhar; Editing by Ed Osmond and Pritha Sarkar)