The Swiss great had not played a match since a semi-final defeat by Novak Djokovic at the Australian Open in January 2020, 405 days ago.
Roger Federer played and won his first professional match in over a year as the 20-time Grand Slam champion returned from injury to beat British number one Dan Evans at the Qatar Open.
Federer, who underwent two knee surgeries in 2020, still proved a tough opponent for an in-form Evans who ultimately succumbed 7-6 (10/8), 3-6, 7-5 after an epic tussle lasting two hours and 24 minutes on Wednesday.
The Swiss great had not played a match since a semifinal defeat by Novak Djokovic at the Australian Open in January 2020, 405 days ago, and acknowledged it was unusual for a player of his age to return after injury.
"I don't know if it was ever completely pain free," Federer said. "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."
Federer joked with the umpire at the coin toss about the rules of the sport during Covid-19, having not played since the ATP Tour was suspended last year due to the pandemic.
The 39-year-old had to battle, saving a set point against a player who was a recent training partner.
In the third set, Federer failed to win his first match point.
On the second match point, however, Federer proved too much for his opponent, sealing his comeback win with a backhand down the line, to huge applause.
"I was tired, I was more focused on being tired than winning the point," he said.
"Dan had more energy left at the end. I thought I played a really, really good match."
Roger Federer on his recovery plans now: 'You're talking to an old school guy here. I've done one ice bath and I didn't like it. I'm not going to do that again. I don't take painkillers for fun, only when I really have to...'— George Bellshaw (@BellshawGeorge) March 10, 2021
Federer had received a rapturous welcome from the 20 percent-capacity crowd at Doha's Khalifa Tennis Complex, beaming back at the fans, some of whom brandished portraits of the Swiss star while others held his national colours aloft.
Federer, the tournament second seed, faced a break point at 4-4 in the opening set but was able to pull it back.
Evans secured two points in a row against the Federer serve in the tie-break but the former world number one proved unstoppable, winning the first set in 49 minutes on his third set point.
Evans, 30, said after the match "it was clear he'd been off but (he) showed a lot of glimpses of why he's so good."
While Federer was out of action, Rafael Nadal equalled his men's record Grand Slam title haul with a 13th Roland Garros triumph.
'Long and tough road'
Djokovic, meanwhile, captured a ninth Australian Open last month to take his career Slam tally to 18.
Federer has insisted his recovery from knee surgery was "completely under control" ahead of his return to competitive tennis.
"It's been a long and tough road for me," he said Wednesday.
"To come back at my age is not very simple."
Federer will turn 40 in August and said that he was hoping to be back to "100 percent" for Wimbledon in June but had not taken decisions on tournaments before then or the Tokyo Olympics.
"Feels good to be back. I'm happy to be standing here regardless of whether I won or lost...Nice to finish with a backhand down the line, always on a match point"— Christopher Clarey (@christophclarey) March 10, 2021
Federer is an eight-time Wimbledon winner but has yet to win a singles gold at the Olympics.
"Most people would probably hope he wins another, Wimbledon... we'd be pretty pumped if he got over the line at another Slam," Evans said.
Federer had said that while he was disappointed not to be returning to a full house because of Qatar's strict coronavirus measures, he was happy to have some fans.
"It was worth it because I played a great match today," he said.
Federer, who has 103 career titles and is just six back from Jimmy Connors' record, said that the complications that followed his two knee surgeries motivated him to get back in form.