Roger Federer beat Britain's Dan Evans on his comeback after 14 months out through injury but said he had not played pain-free.
The Swiss 20-time Grand Slam winner, 39, won 7-6 (10-8) 3-6 7-5 to reach the Qatar Open quarter-finals in Doha.
He had not played competitively since January 2020 after two knee surgeries.
"It feels good to be back. It's good to be standing here regardless of whether I won or lost, it's great fun," Federer said.
"I don't know if it was ever completely pain-free," he added. "You get to feel tired and you don't know if it's the muscle.
"[What's] important is how I feel tomorrow and the next day for the next six months."
After a tight first set, Evans won four successive points in the tie-break to lead 4-2. But Federer fought back to level the scores before taking the set with magnificent backhand cross-court pass.
Evans, who had lost all three of his previous career meetings with Federer, capitalised on a series of errors from the Swiss in the fourth game of the second set to break serve and move 3-1 ahead, before taking the set 6-3 to force a decider.
The deciding set was much closer and went with serve until the 12th game, when Federer broke Evans' serve for the first time in the match to seal victory in front of a socially distanced crowd at the Khalifa Tennis Complex.
"Dan had more energy left at the end but I thought I played a good match and I'm incredibly happy with my performance," the Swiss said.
Federer, a three-time winner of the event, will play Georgia's Nikoloz Basilashvili in the last eight.
Analysis
BBC tennis correspondent Russell Fuller
Four hundred and five days after his last appearance, Federer recorded the 1,243rd win of his career.
For a car that has been off the road for so long, the motor was ticking over incredibly well.
Federer has always had the ability to pick up pretty much where he left off, and he played an outstanding first set built around that rock-solid serve.
His performance did become a little more patchy as the match wore on - something the 39-year-old blamed primarily on footwork - but this was a fabulous start against an opponent who played well, and already has an ATP title to his name this year.