Andy Murray's bid for a first grass-court singles title in six years ended in defeat by Matteo Berrettini in the Stuttgart Open final.
The Briton, 35, was troubled by what looked like a left hip problem in the third set of a 6-4 5-7 6-3 loss.
Before that, his run had been full of encouraging signs with Wimbledon just 15 days away and will send him into the top 50 for the first time since 2018.
Victory was a dream return for Italy's Berrettini, 26, after three months out.
But the second seed admitted that this was "not the way we wanted to end the match", referring to Murray's visible struggles.
The Scot is due to play next at Queen's Club in the Cinch Championships, which start on Monday, but the sight of him receiving treatment on the ground twice in the third set may have organisers wondering whether he will be able to play.
The problem was on his left side rather than with the right hip that has a metal plate after a hip resurfacing operation in 2019.
Murray's fightback falls just short
Three-time Grand Slam Champion Murray, whose last grass-court singles title was at Wimbledon in 2016, had not dropped a set all week but was broken in his second service game.
He had four immediate break-back chances in the next game but Berrettini used his big serve to hold, consolidating his lead and then eventually taking the first set with one of his trademark forehand winners.
An increasingly vocal Murray roared when he saved three break points to avoid going 5-4 behind in the second and screamed "let's go!" when Berrettini sent a forehand long to hand him the second set.
But the Briton gave away a loose game at the start of the third and called on the physio for treatment on his left hip after he was broken.
Berrettini did not lose focus while waiting for Murray and backed up the break with a swift hold to love.
The Scot needed the physio again in the seventh game and even though he held his serve, he visibly struggled for the rest of the match and it looked at times as if he could retire from the final.
The Italian world number 10 broke Murray's serve to wrap up a win that put his season back on track in time for Queen's, where is is defending champion, and Wimbledon, where he was runner-up last year.
"It feels unbelievable," said Berrettini, who had surgery on his racquet-playing hand in March.
"Coming back from an injury and the first surgery in my life and winning the title, not playing my best tennis in the first round... it feels even more special."
Injury clouds Murray's otherwise bright week
Seeing Murray in discomfort was a reminder of how much he has overcome to resurrect a singles career that he thought might be over when he had major hip surgery three and a half years ago.
In Stuttgart this week he has enjoyed one of his best tournaments since his comeback, including a win over top seed Stefanos Tsitsipas in the quarter-finals for his first victory over a top-five player since beating Novak Djokovic in the ATP Finals in 2016 and an absorbing win over Nick Kyrgios in the semi-finals.
The reward was the chance to go for a first ATP title since 2019 in what was his 70th career final.
For much of this match against Berrettini he moved very well, drawing gasps from the crowd for one particular dash from the back corner of one side of the court to retrieve a drop shot at the net on the other side and unleash a stunning winner midway through the first set.
But then he was let down by his body just a couple of days before he is due to play in front of home fans at Queen's, where he is a five-time champion.
"There's been a lot of progress in the last few weeks and I'm looking forward to seeing what the future holds," Murray said in his runner-up speech.
"I'm feeling better about my game. I hope my body holds up."