A tearful Roger Federer bid goodbye to a 25-year career with defeat at the Laver Cup in a doubles contest that went past midnight in London.
Federer teamed with long-time rival Rafael Nadal against American duo Frances Tiafoe and Jack Sock as Team Europe face Team World at the O2 Arena.
After winning the first set, the Swiss and the Spaniard were faced with a spirited fightback from Tiafoe and Sock, who won a second-set tie-break before also clinching the match tie-break to seal victory 4-6 7-6 (7-2) 11-9.
There had been a great atmosphere in London on Friday for the fifth edition of the three-day competition.
Federer, 41, had not played a match since he was knocked out of Wimbledon by Hubert Hurkacz at the quarter-final stage last year due to knee injury.
There were huge cheers when Federer and Nadal came onto the court and loud roars for the Swiss great when he came up with his first winner.
There was a sensational moment in the first set when Federer appeared to have won a point after his shot hit the top of the net and bounced in, only for a replay to show the ball had somehow been hit through a small hole between the net and the post, meaning Team Europe lost the point, despite the remarkably unlikely event of the ball passing through such a gap.
Novak Djokovic and Andy Murray were among Federer and Nadal's team-mates offering some tactical input between games, and the legendary duo had to save a first break point of the match before the Spaniard held to put them 5-4 up.
It was two of the all-time greats that took a tight opening set when Sock put a volley into the net, prompting Team World captain John McEnroe to tell his doubles pair they appeared to be getting "caught up in the hoopla."
A determined Team World managed to level it up after a back-and-forth second set went to a tie-break, with Tiafoe and Sock coming out on top with their superior power and pace.
That took it to a dramatic deciding match tie-break, with every point keeping fans holding their breath, including some trademark Federer magic at 6-7 when he diverted a Sock shot across court for a crowd-pleasing winner.
It looked like the dream script was being followed as Federer served at match point for himself and Nadal, but the former could only hit a shot into the net, before Sock and Tiafoe won the next two points to secure the win for Team World.
It was then hugs all round as respect was paid to the 20-time grand slam winner at the conclusion of a phenomenal career.
Earlier in the day, Casper Ruud drew first blood for the Team Europe, beating Sock 6-4 5-7 10-7, before Stefanos Tsitsipas doubled their advantage with an emphatic 6-2 6-1 defeat of Diego Schwartzman.
There was drama after the first set of that second singles match when a protester, wearing a T-shirt with the message, "END UK PRIVATE JETS" on, set their arm alight on court before being escorted out by security.
Alex de Minaur then got Team World on the board with a 5-7 6-3 10-7 success over home favourite Murray before the late-night main event under the lights.