Roger Federer lost his second match since returning from a 14-month injury lay-off, going out to Nikoloz Basilashvili in the quarter-finals of the Qatar Open.
The 20-time Grand Slam winner was overcome by Georgia's Basilashvili 3-6 6-1 7-5 in Doha.
Federer had beaten Britain's Dan Evans on his return to action on Wednesday to reach the last eight.
Basilashvili saved a match point before going on to beat the Swiss 39-year-old.
After Federer missed his chance of victory in the 10th game of the deciding set, world number 42 Basilashvili went on to break the three-time Qatar Open winner in the ensuing game and eventually prevailed in one hour and 50 minutes.
Federer, in competitive action for the first time since January 2020 after two knee surgeries, said playing two matches in two days was "a good stepping stone" in his recovery.
"I've come from so far away that I am actually happy I was able to play back-to-back three-set matches against top players," he said.
"That's an important step forward for me. I'm not at 100% yet.
"I still need another five or six weeks in fitness.
"In the next four months until Wimbledon, we've got to take a real good look at the schedule and see how much workload the knee can take, and what's the best way to prepare for what's basically the beginning of the season for me - which is the grass court season."
Beating Federer 'a dream come true'
Basilashvili said fighting back from a set down to beat Federer was "unbelievable".
"I am very happy he came back to play, and to win against him is a dream come true," the 29-year-old said.
"He was always my idol, and I am sure he is to many tennis players and fans, so I am unbelievably happy."
Basilashvili will face 23-year-old Taylor Fritz on Friday after the American beat Denis Shapovalov 5-7 6-3 7-5.
Andrey Rublev reached the semi-finals at the Khalifa Tennis Complex without playing a single match after Marton Fucsovics withdrew with a back injury.
Rublev, ranked eighth in the world and given a first-round bye, was handed his second walkover in as many days after Richard Gasquet pulled out of their second-round meeting on Wednesday with a leg injury.
The Russian becomes the first men's singles player since 1990 to receive back-to-back walkovers at a tournament
Norrie beaten in Marseille
Elsewhere, Great Britain's Cameron Norrie was beaten by Frenchman Pierre-Hugues Herbert in the second round of the Open 13 Provence in Marseille.
The British number three, who reached the third round of the Australian Open in February, went down 6-3 6-4 against Herbert, who is ranked 30 places lower than Norrie at 93.
Herbert saved all five break points he faced against Norrie, and hit 14 aces compared to just one from the 25-year-old left-hander.