Roger Federer was pushed into a decider by Alexander Zverev at the ATP World Tour Finals, but then proved too strong in a 7-6 5-7 6-1 win.
The 36-year-old six-time champion may have been giving away 16 years to the man tipped to be the next superstar of the game but Federer proved in a dominant third set that for the moment he remains a cut above his young pursuers.
The triumph in 2 hours 11 minutes puts the 19-times Grand Slam champion in Saturday's semi-finals - the 14th time he has made the last four in 15 appearances - with the tournament still only three days old.
It also meant that Zverev and Jack Sock, who earlier battled from behind to beat Marin Cilic 5-7 6-2 7-6(4), will now meet on Thursday to decide the other qualifier from the Boris Becker group.
Federer's win ensured Cilic, once again a disappointment at the season-ending tournament, was eliminated. World number two Federer is now an overwhelming favourite for a seventh crown in the absence of Rafael Nadal, who has pulled out injured.
Rafa Nadal has revealed the advice he gave to rival, and now Laver Cup team-mate, Roger Federer as the weekend’s events reached a thrilling conclusion in a match between the Swiss great and Nick Kyrgios.
Federer dropped the first set against the Australian and if he had lost to the young pretender then Team World would have forced a deciding doubles match against Team Europe.
But in the new competition, in-game coaching is permitted and tennis fans were treated to a new spectacle as Nadal went to have a chat with the man with whom he has shared 35 Grand Slam titles.
Federer duly turned things around to deliver victory for his team in the inaugural tournament.
“Just to be a bit more aggressive,” Nadal told Sky Sports when asked what he said to Federer. “He is playing great, and controlling the points from the base line.
“But we thought that he could be a bit more aggressive on the forehand and Roger agreed.”
Nadal and Federer have forged one of sport’s most enduring and gripping rivalries with their battles on the Grand Slam stage but on Saturday night, tennis fans saw the two greats unite for a doubles match for the first time.
Footage showed the two discussing their tactics prior to beating beat Americans Sam Querrey and Jack Sock 6-4 1-6 10-5.
And they shared some emotional moments on the sidelines too as Team Europe resisted a stirring comeback from the rest of the world.
Roger Federer won the inaugural Laver Cup for Team Europe on Sunday, beating back a fierce challenge from players from the rest of the world to claim the trophy in a dramatic final match of the weekend.
Despite cruising through the first two days, the Europeans needed the last match to finalise the victory and show the dominance expected from a team featuring five of the world's top seven players.
Federer delivered in a tight 4-6 7-6(6) 11-9 win over world number 20 Nick Kyrgios, with the Australian pushing to the final point as he sought a win that would have forced an overtime doubles match to decide the tournament.
But Kyrgios squandered a chance at match point and then smashed the ball into the net to end the battle, spurring Federer's European team mates, led by top-ranked Rafael Nadal, to leap off the bench and embrace the Swiss at the net.
"I was ready to go. I had to be. That is what a team member does. The boys played fantastic all weekend but we knew it could change very quickly on Sunday," Federer said.
"I was looking at getting ready maybe for doubles at the end... But I got it done."
An earlier victory from big-hitting German Alexander Zverev also helped fight off the last-day comeback from Team World, which entered the day 9-3 down after dropping six of the first eight matches.
With matches worth three points on Sunday - versus two on Saturday and one on Friday - the group battled back with Americans John Isner and Jack Sock downing Croatian Marin Cilic and Czech Tomas Berdych, who was playing in front of the hometown crowd at Prague's O2 Arena.
The American duo limited the hard-serving Europeans to three aces in a 7-6(5) 7-6(6) victory.
Zverev, the youngest player in the top 10 at age 20, then faced Team World's highest ranked player at number 16, Sam Querrey. He broke the American's serve midway through the first set and never looked back en route to a 6-4 6-4 win.
That left Nadal to face Isner, winless in six career meetings with the Spaniard. But the world number 17 rattled Nadal from the beginning and delivered a barrage of 23 aces and several forceful winners and drop shots.
"I walked to the court like I had absolutely nothing to lose and I just went for it," Isner said.
Federer then played hero, battling back after dropping the first set to Kyrgios who had looked to keep Isner's giant-killing momentum going.
The Laver Cup, named after Australian tennis hero Rod Laver, has won plaudits from the players. Matches were close despite fears they would be little more than an exhibition.
Federer and Nadal, the game's top two players who split this season's four grand slams, teamed up on Saturday, putting aside a long-running rivalry to play doubles competitively for the first time, giving fans an eagerly anticipated treat.
With next year's play moving to Chicago, a John McEnroe-captained Team World will look to bounce back against Bjorn Borg's Team Europe.
"We were so, so close to pulling this off," McEnroe said.
Roger Federer and Rafael Nadal were victorious in their hotly-anticipated first doubles match together at the Laver Cup - but it did not come easy.
After having faced each other 37 times on the ATP Tour as rivals, the legendary duo finally found themselves on the same side of the net as they took on Sam Querrey and Jack Sock from the World team in the alternative format.
Federer and Nadal won the opening set and fans thought it would be plain sailing for the star pairing, but Sock and Querrey roared back to take the second, losing just one game in doing so.
With 35 Grand Slam titles between them, every shot from the Europe partnership was celebrated wildly by the fans in Prague - and on social media.
The match had to be decided by a 10-point tie-breaker, and Federer and Nadal came through to take it and ensure that their partnership remains an unbeaten one.
As a result of the pair's victory, Europe lead the World 9-3 with Bjorn Borg's team now within touching distance of taking the title against John McEnroe's men.
View image on Twitter
Roger Federer continued his charge for a sixth US Open title after powering past Philipp Kohlschreiber 6-4 6-2 7-5 in the fourth round.
Kohlschreiber’s head-to-head record against the 36-year-old read 0-11 going into the night match on Arthur Ashe, and the German was powerless to prevent Federer from turning that into 12.
The world number three did not face a break point all match as he waltzed into his 12th quarter-final at Flushing Meadows.
Federer goes on to face Juan Martin del Potro for a place in the last four after the Argentine battled from the brink to win a classic five-set encounter against Dominic Thiem.
Having opened his US Open campaign with two five-setters, Federer was hoping this follow of the path of his straight-sets victory over Feliciano Lopez in the previous round.
And after one break helped Federer seal a speedy first set in 39 minutes, it was clear Kohlschreiber would have to go some to produce a shock on Monday night.
The second set saw Federer break twice from four opportunities, with the Swiss hitting 10 winners to just three unforced errors.
Kohlschreiber put up more of a fight in the third, but Federer grabbed the crucial break in the 11th game before serving out for the match.
Roger Federer dismissed any fears about his fitness as he confidently swatted Feliciano Lopez aside, winning 6-3 6-3 7-5 in the third round of the US Open.
Federer’s match was the first of the evening session but started deep into the night due to overrunning matches, with play not commencing until 2:45am UK time.
The Swiss great, targeting his 20th Grand Slam title, had been put through back-to-back five-setters against Mikhail Youzhny and Frances Tiafoe in his first two matches but made a statement of intent against the Spaniard.
Federer, 36, took the first set 6-3 in under 30 minutes and added the second by the same score as he rarely looked troubled, unleashing moments of occasional brilliance as he dealt with Lopez comfortably.
The world number three, looking to win his third Grand Slam of the season after the Australian Open and Wimbledon, broke Lopez in the fourth game of the third set but finally encountered some resistance as his opponent immediately broke back.
Federer was far too good though, recovering something approaching his best form after a tricky start to the tournament.
Federer plays Germany’s Philipp Kohlschreiber in the fourth round.
Roger Federer has finally reached his "special number" with his eighth Wimbledon win - and somehow he's still improving, writes Dan Quarrell at the All England Club.
It was supposed to be the time when Roger Federer's illustrious career was on the wane. It was supposed to be the time when younger stars stepped up and usurped the king. Instead, 2017 has seen a glorious resurgence from the great Swiss and no marked statement from his supposed heirs.
Just minutes after winning his 19th Grand Slam, Federer's focus had already switched to number 20 as he revealed that he had, in surpassing Pete Sampras's tally, finally reached his "special number" of eight at Wimbledon.
Sitting in front of the assembled media for his press conference, Federer did not cut a jubilant, self-satisfied champion but instead a satisfied and still fiercely-motivated one. As he looked ahead to the end of the season, the sense of more to come was palpable.
Revealing what has made for the perfect year so far, Federer admitted that taking a six-month break and following it up with further time off during the clay-court season prior to Wimbledon has been the ideal recipe for success in what is supposed to be the twilight of his career.
"I'm incredibly surprised at how well this year is going," he said with a look that indicated he was not surprised at all. "I did not believe I'd win two [Grand Slams] this year. It's incredible.
" It is a special number [eight], at my favourite tournament. It's truly amazing."
"For me, a break really worked wonders... my wife still likes me playing. A break might not work for everyone - all players are different and require different things to be successful, but for me it has been perfect."
A further joke about being a "part-time player now" gave the impression that he was easing off, while proving the exact opposite: that he has found a uniquely perfect rhythm on the Tour in very strategically and selectively managing his schedule.
There can be no doubt that Federer has already changed the sport, not only in terms of his achievements and sustained superiority, but in how he has managed both his body and his schedule to do so. He has set a new trend, and one that will surely be followed for years to come.
With both Andy Murray and Novak Djokovic having already suggested that enforced breaks from the sport may be necessary for them to regain the required fitness and form to add to their Grand Slam tallies, Federer is ahead of the game, as he cheekily alluded to when he suggested he take yet more time out of the game in his on-court victory speech.
In skipping the clay-court season, he made a very clear statement and one which is now a resounding inspiration to all those top-tier players feeling as though the gruelling ATP schedule is too much to bear. In the closing stages of a career that can seem frustratingly fleeting, every top tennis player has a right to be picky, and Federer is proving by far the most effective in being so.
In winning his 12th Wimbledon semi-final and eighth title, Federer has very clearly separated himself from once king of Centre Court, Sampras, and put himself yet further ahead of the pack in the all-time men's tennis greats debate.
The Swiss became the second-oldest man to reach a Wimbledon final in the open era with the great Ken Rosewall having finished as the runner-up at the age of 39 back in 1974 – and he proceeded to swat aside Cilic to take a record eighth title at SW19 with consummate ease.
With number 19 in the bag, Federer knows he holds the very clear ascendancy once more on the men's Tour; with the US Open next on his Slam-only radar, he knows he has the best chance of winning the final 'big one' of the season - and in so doing, hit the improbable 20 mark.
As his conquered opponent Cilic ominously revealed with a weary sigh when asked about Federer's astonishing comeback, "even at the age he is now, he's still improving".
The remarkable thing is, he is absolutely right. Having reached his "special number", Federer now really is in dreamland.