Britain's former world number one Andy Murray had hip resurfacing surgery in London on Monday.
The three-time Grand Slam champion, 31, announced in January he would retire this year, preferably after Wimbledon.
But he admitted the Australian Open, where he lost to Roberto Bautista Agut in the first round, could be the final tournament of his career.
He said: "I have a metal hip. Feeling a bit battered and bruised but hopefully that will be the end of my hip pain."
The Scot's post on Instagram featured an X-ray picture of his hip.
What does the operation involve?
Professor Max Fehily, consultant orthopaedic surgeon and clinical director at the Manchester Hip Clinic, says the operation involves "smoothing down the ball, then covering it with a metal cap".
"Then a layer of metal is placed within the pelvic socket in which it sits," he added.
American doubles legend Bob Bryan had a similar operation in 2018. The 40-year-old was on court within five months of his operation and competed with twin brother Mike at the Australian Open.
Prof Fehily added that "90 to 95% of patients who have this surgery are delighted and live a pain-free life", although none of his patients try to play professional tennis.
- Doubles specialist Bryan made it back from resurfacing op - can Murray?
- How Murray helped create golden period for British sport
- What will Andy Murray be worth in retirement?
- The moment Murray knew the game was up
Murray initially had surgery on his right hip in January 2018 and has played 15 matches since returning to the sport last June.
He was due to play in February's Marseille Open but withdrew from the tournament earlier in January.
Murray ended his 2018 season in September to spend time working with rehabilitation expert Bill Knowles.
But he was in tears at a news conference in Melbourne when he announced before the first Grand Slam of 2019 that it may be the final one of his career.
Murray then said following his five-set exit to Bautista Agut that he would need "a big operation" if he was to play again, but added: "I'll give it my best shot."
In an interview with BBC Radio 5 live, the two-time Olympic champion said surgery was the only option if he wanted to play beyond Wimbledon.
"However, there is a strong possibility I won't come back and play after an operation. I want to play tennis, but not with the hip I have right now," he added.
Murray said surgery on his hip would mean "my quality of life would be better".
"Just going to walk my dogs, playing football with my friends, is the worst thing I can think of doing," he said.
"I hate it because it's so sore and it's uncomfortable. Waiting another five or six months to do something like that is just another period where I'm really uncomfortable."
BBC tennis correspondent Russell Fuller
"Athletes have had operations like that done and come back to play, but certainly not in singles," Murray told me in Melbourne after that very emotional news conference.
I am sure there is a small part of him that has not abandoned all hope of continuing his career, but this operation is first and foremost about improving his quality of life.
If the operation proves successful, Murray might be able to make a farewell appearance at Wimbledon - although there can be no guarantee he will ever be able to compete again.
Bob Bryan played again five months after having the same operation, and reached the last eight of the Australian Open with his twin brother Mike.
Wimbledon just happens to be five months away; and Andy also has a brother who is one of the best doubles players in the world.
We can but speculate for the moment. Time will tell.