Rafael Nadal won his 19th Grand Slam title after holding off Russian Daniil Medvedev's exhilarating fightback in one of the greatest US Open finals.
Spain's Nadal, 33, won 7-5 6-3 5-7 4-6 6-4 against the fifth seed in New York.
Nadal, seeded second, was cruising at two sets and a break up, only for Medvedev to force a decider.
But Nadal stopped his momentum to clinch a thrilling win in four hours and 50 minutes - just four minutes shorter than the longest US Open final.
Nadal's victory moves him within one of Swiss rival Roger Federer's all-time leading tally of men's Grand Slam victories.
"It has been one of the most emotional nights in my tennis career," Nadal said. "It has been an amazing final. It has been a crazy match."
After taking his third match point, Nadal collapsed to the court in celebration, covering his face as he contemplated another famous victory which epitomised his fighting spirit.
Medvedev, 23, trudged around the net to warmly congratulate his opponent, who looked on the verge of tears as he hid behind his sweat-soaked vest while taking rapturous acclaim.
"I just want to congratulate Rafa, a 19th Grand Slam title is something unbelievable, outrageous," said Medvedev, who looked mesmerised as he watched a video montage of Nadal's achievements.
Those lucky enough to be watching among a near-24,000 capacity crowd were regularly left open-mouthed at what they witnessed, with the majority jumping to their feet and celebrating wildly after every point, helping create an electric atmosphere on a noisy Arthur Ashe Stadium.
Medvedev had been booed by the crowd earlier in the tournament, yet heard his name loudly chanted by many as he threatened to complete an extraordinary comeback.
Ultimately it was too late as he was unable to become the first man outside Nadal, Federer and Serbia's world number one Novak Djokovic to claim one of the sport's biggest prizes since Stan Wawrinka's victory here in 2016.
Nadal, Federer and Djokovic have won the past 12 Grand Slams after the Spaniard lifted the trophy in New York for a fourth time.
Now Nadal has the chance to draw level with 38-year-old Federer, who was nine titles better off than his long-time rival in 2007, at the Australian Open in January.
Emotional Nadal outlasts latest young challenger
Despite Nadal, Federer and Djokovic being in their 30s, nobody has been able to break their stranglehold on the men's game and Medvedev was the latest to fall short after a heroic effort.
That has allowed the illustrious trio to pile on the Grand Slam victories over the past three years, livening up the race to be crowned the greatest of all time, which Federer once seemed certain to win.
Nadal, who also won his 12th French Open title this year, is now within one of Federer's tally for the first time.
The magnitude of his achievements - which were shown on the big screen inside Ashe - hit the emotional Spaniard, who broke into tears while he sat in his chair and watched them.
That was a release of all the expendable emotional energy built up over the final two sets of a match which, against a less inspired opponent, he may have wrapped up much earlier.
A couple of hours before, Nadal appeared to be heading to a dominant three-set win against Medvedev, who was the first Russian man to compete in a Grand Slam final since Marat Safin at the 2005 Australian Open.
A physical contest, where both men jousted for supremacy as they tried to outlast each other in brutal rallies, seemed destined to end in familiar fashion when Nadal broke for a 3-2 lead in the third set.
From somewhere, Medvedev summoned the strength to not only survive but threaten to produce one of the most memorable comebacks ever seen.
But Nadal's intensity allowed him to eventually outlast the wiry Russian who, despite struggling with a quad injury during the tournament, continued to hang in even as the clock approached five hours.
Nadal's mental resilience saw him through in the end, despite Medvedev producing another fightback from a double break down at 5-2 in the decider.
A fourth victory at Flushing Meadows seals another stellar year for Nadal, who reached three Grand Slam finals in the same year for the fourth time of his incredible career.
BBC tennis correspondent Russell Fuller
That is now 12 Grand Slam titles in a row which have been won by Nadal, Federer and Djokovic. Their domination of the sport began in 2005, and does not show any signs of abating.
But the way Medvedev played should give the younger breed real heart. There are three other top-10 players who are the same age or younger than the 23-year-old Russian.
Medvedev played with passion, power, resilience and great touch at the net, and in the fourth set Nadal looked increasingly stressed.
And yet he came through once again, for the fourth time at the US Open, and on a surface which has so often disagreed with his body.
Surely no-one who saw Nadal limp away from last year's Australian Open quarter-final with a leg problem, and from last year's US Open semi-final with a knee injury, could begrudge him one of the most emotional triumphs of his career.
'One of the greatest finals' - Reaction
Thirty-nine-time Grand Slam champion Billie Jean King: One for the ages! Absolutely incredible #USOpen Men's Singles Final with the indomitable @RafaelNadal winning his fourth US Open title. Congratulations, Rafa!
2017 US Open champion Sloane Stephens: Wowwww that was unreal tennis - talk about leaving it all on the court. What a battle. Congrats Rafael Nadal & you too Daniil Medvedev
Former US Open finalist Greg Rusedski: What we have just witnessed is one of the greatest US Open men's finals in the history of tennis. Daniil Medvedev was incredible to fight back from two sets down and a break. Rafael Nadal showed us why he is the greatest competitor we have ever seen on a tennis court. Slam No. 19!
Tennis great Rod Laver: Congratulations Rafael Nadal, a gutsy victory to claim your 19th major, fourth US Open crown and second Slam title this year after the French. Stand tall friend, you are closing in, it was a privilege to present this trophy to you tonight.