London - Roger Federer can reflect with satisfaction on a season in which he reached his century of titles but his campaign will be defined by the one that got away at Wimbledon.
The Swiss veteran exacted revenge on Novak Djokovic at the ATP Finals in London but could not get past Greek youngster Stefanos Tsitsipas in the semi-final on Saturday.
It meant no fairytale end to the season for Federer, who now has 103 singles titles in his long and illustrious career - just six behind all-time record holder Jimmy Connors.
The 38-year-old won four titles in 2019, including the Miami Masters, winning for the 10th time in both Halle and Basel and reaching the semi-finals at the French Open.
The victory on grass in Halle set him up nicely for a shot at a ninth Wimbledon crown but he fell agonisingly short, failing to convert two championship points on his own serve against Djokovic.
Federer himself insisted the pain of defeat at the All England Club did not linger long, saying it took two weeks at most to move on.
But he clearly relished his brilliant victory against his Serbian rival in his final round-robin match in London this week, during which his serve worked like a dream and he made just five unforced errors.
With no Djokovic and Rafael Nadal in the semi-finals, Federer looked to have a great chance to win a record-extending seventh title at the end-of-year event.
But he was unable to hit the same heights in his semi-final against Tsitsipas despite vocal support from a packed house at the O2 Arena, failing to capitalise on 11 out of 12 break points.
He now heads off to play a series of exhibition matches in Latin America but already has an eye on next season.
"I've got to keep on playing at the level like I have this year, and then I will create some chances," Federer after his defeat to Tsitsipas.
"I thought I played some consistent, solid tennis. Got to take care of my body, listen to the signs, work well with the team, get the balance right with everything that's happening in my life."
Federer's announcement last month that he would compete at next year's Tokyo Olympics means questions about when he will retire can be shelved for now.
Gold in the men's singles is the only major prize missing from his trophy cabinet - he was beaten in the 2012 final in London by Andy Murray.
But Federer must also sense Nadal breathing down his neck. The Spanish world number one now has 19 Grand Slams, just one shy of Federer's mark of 20 and Djokovic has 16.
The Swiss will feel he will likely have to add to his tally to keep his nose in front, with Wimbledon being his best hope of another Grand Slam crown.
Federer said producing his best tennis day after day was not as easy as it had been a decade ago and that sometimes it needed extra effort.
"Maybe that's what it felt like today, is just things were complicated, you know, but I've got to maybe do even a better job at figuring these moments out, because the opportunities were there today, for instance," he said.
"They were there in other moments as well this season, maybe Indian Wells or Wimbledon or whatever. That can change an entire season around, the confidence around, the flow of things.
"But, you know, I'm happy how I played this season, and I'm extremely excited for next season."