World number one Novak Djokovic beat Roger Federer in four dramatic sets to win his second US Open and 10th Grand Slam title.
The Serb won 6-4 5-7 6-4 6-4 in New York, and will end the year with three of the four tennis majors.
Djokovic, 28, held his nerve in front of a heavily pro-Federer crowd at Flushing Meadows.
The 34-year-old Swiss had been hoping to win his 18th major title and first for three years.
In a raucous New York night session atmosphere on Arthur Ashe Stadium, after the start of play was delayed by more than three hours because of rain, Federer looked to have a real chance in the third set.
However, Djokovic broke the Federer serve six times and saved 19 of 23 break points as he battled his way to a 27th win in 28 Grand Slam matches this year.
Djokovic took another step towards joining the very best in history with a 10th major title, moving him within one of Bjorn Borg and Rod Laver in the all-time list.
Defeat by Stan Wawrinka in the French Open final in June means the Serb was just one win short of completing the first calendar Grand Slam in men's tennis since Laver in 1969.
"It's been an incredible season, next to 2011 the best of my life," said Djokovic, who also won three Grand Slam titles four years ago.
"But I'm enjoying this year more than I did any previous one because I'm a husband and a father, and that makes it sweeter."
Five-time champion Federer was playing his first US Open final since 2009, and drew one of the loudest cheers of the night when he told the crowd: "I'll see you guys next year."
The Swiss added: "I'm pleased with where my game is at.
"It is always tough playing [against Djokovic] and I think we both walk away from it knowing more about our games and more about each other."
Federer came into the final having dropped serve just twice in the tournament and not having lost a set since Wimbledon, but Djokovic set about ruining those statistics.
The Serb made the sharper start, breaking the Federer serve twice in the first seven games and clinching the set after 41 minutes.
From then on, it was Djokovic's mental fortitude as much as his tennis that shone through as he turned the match around in the third set and held off a Federer comeback in the fourth.
After a tentative start, Federer had begun to move forward in the second set, at times deploying the net-rushing return - which has been called SABR ('Sneak Attack By Roger') - that he has developed this summer, only for Djokovic to keep finding a way past, or over, him.
The Swiss kept pushing, however, converting his fourth set point with a rasping backhand to send the vast majority of the 23,000 spectators wild.
Djokovic, now coping with occasional boos and shouts during his service motion, looked to be struggling after letting an early lead slip in the third, but he saved two break points at 4-4 and then wrestled the momentum back his way.
Federer, rueing the missed opportunity, let his guard slip and Djokovic pounced, forcing a backhand error to clinch the set.
With the momentum back with him, the top seed broke Federer twice to lead 5-2 in the fourth and then withstood another comeback as the Swiss earned three chances to level at 5-5.
The crowd was once again roaring the 17-time Grand Slam champion back into the match but Djokovic stood firm, seeing off the break points and defiantly clenching his fist when Federer floated the ball long on championship point.
The Swiss was playing in his seventh final in Arthur Ashe Stadium, but even he was taken aback by the support he received.
"They were unbelievable," said Federer. "Were they better than ever? Possibly."
The spectators were made to wait as the rain fell at Flushing Meadows, delaying the start time from 21:00 BST to 00:20, but quickly made their feelings known once play began by getting behind the former champion.
"It's so nice to feel that they want you to get back into the match, they want you to win, they're enjoying what they're seeing and getting their money's worth," he said.
"They were right there until I needed them at the very, very end."
Greek umpire Eva Asderaki was already having a good night, but the first woman to chair a men's US Open final got the biggest decision spot on.
Trying to convert a second break point as he attempted to stay alive in a dramatic third set, Federer fired a cross-court backhand that looked for all the world a winner.
However, the call of 'out' came from the chair and Hawk-Eye backed Asderaki's decision by the narrowest of margins.
Djokovic successfully defended 19 of 23 break points
Federer was bidding for his first Grand Slam title since Wimbledon 2012
Federer and Djokovic have now met 14 times at Grand Slams - more than any other pairing - with Djokovic claiming his eighth win
Djokovic has beaten one of Federer, Rafael Nadal or Andy Murray in the final of his last nine victorious Grand Slams