Novak Djokovic rallied from two sets down against compatriot Laslo Djere to avoid his earliest US Open exit since 2006 on Friday, while Iga Swiatek and Coco Gauff closed in on a blockbuster clash.
Djokovic tapped into his unrivalled powers of recovery to reach the last 16 and keep alive his quest for a record-extending men's 24th Grand Slam crown with a 4-6, 4-6, 6-1, 6-1, 6-3 win over the 32nd-seeded Djere.
"It was one of the toughest matches I've played here in many years," said Djokovic.
Djokovic, after coasting through two rounds, risked failing to make the second week in New York for the first time since losing to Lleyton Hewitt in the third round as a teenager 17 years ago.
An inspired Djere broke in the opening game en route to bagging the first set and did so again midway through the second set to put the 28-year-old in sight of an improbable victory.
But Djokovic showed why he will reclaim the world number one ranking after the tournament, displaying his trademark resilience to wriggle his way out of a two-set hole for the eighth time in his career at a Grand Slam.
The only other time he escaped such a predicament at the US Open came when he won the first of his three titles in 2011 after saving two match points against Roger Federer in the semi-finals.
Djokovic revealed he had given himself an angry pep talk in the locker room after falling two sets behind.
Novak is ready for bed🛏️😴 pic.twitter.com/QsfGEm9fmK— US Open Tennis (@usopen) September 2, 2023
"I did a little pep talk in the mirror," he said. "I laughed at myself because I was so pissed off with the way I played, to try and lift my spirits up.
"I've done it a few times before in my career and it hasn't worked but tonight it did and I'm grateful."
The 36-year-old Serbian star goes on to face 105th-ranked Croatian qualifier Borna Gojo for a spot in the quarter-finals.
Gauff tested as Swiatek dominates
The in-form Coco Gauff, coming off titles in Washington and Cincinnati, also had to dig deep to withstand Belgium's Elise Mertens as the 19-year-old American fought her way to a 3-6, 6-3, 6-0 victory.
"A win is a win, it doesn't matter how you get it done," said Gauff. "If anything the three-setters show everybody else I'm not going down without a fight."
Mertens fended off a pair of break points in the sixth game of the first set and then broke twice in succession to surge ahead.
Gauff, taken the distance in the opening round, held off a barrage of break points early in the second set before swinging the momentum in her favour as Mertens began to falter.
She finished off in style by winning 10 games on the bounce to book a fourth-round meeting with Caroline Wozniacki, moving her one win away from a possible blockbuster quarter-final with Swiatek.
The Pole briefly put sentiment to one side as she demolished 145th-ranked Slovenian qualifier and close friend Kaja Juvan 6-0, 6-1 in just 49 minutes.
"I didn't like the fact that I was kind of winning with my best friend," said top seed Swiatek. "It was like playing against a sister because I've known her for so long."
Iga Swiatek is bidding to become the first woman to successfully defend her US Open crown since Serena Williams won a hat-trick of titles from 2012-2014.
She next faces 2017 French Open champion Jelena Ostapenko, who beat Bernarda Pera in three sets.
Former world number one Wozniacki, playing her first Grand Slam in over three years, kept her fairytale US Open return going with a 4-6, 6-3, 6-1 win over Jennifer Brady.
Romania's Sorana Cirstea defeated fourth seed and last year's Wimbledon champion Elena Rybakina 6-3, 6-7 (6/8), 6-4. She will face Swiss 15th seed Belinda Bencic in the last 16.
Czech 10th seed Karolina Muchova moved on courtesy of a 7-6 (7/0), 6-3 win over Taylor Townsend.
She will meet China's Wang Xinyu who battled into the fourth round of a Grand Slam for the first time by coming from a set down to oust Slovakia's Anna Karolina Schmiedlova.
Strong home interest
Ninth seed Taylor Fritz led a quartet of American men through to the last 16 seeking to become the host nation's first male Grand Slam champion since Andy Roddick here in 2003.
Fritz crushed Czech qualifier Jakub Mensik 6-1, 6-2, 6-0. Mensik was the youngest man to reach the US Open third round since 1990 and celebrated his 18th birthday on Friday.
Frances Tiafoe, a semi-finalist last year, progressed with a 4-6, 6-2, 6-3, 7-6 (8/6) win over France's Adrian Mannarino.
Tommy Paul, the 14th seed, advanced with a four-set win over Spain's Alejandro Davidovich Fokina, while Ben Shelton put out Aslan Karatsev 6-4, 3-6, 6-2, 6-0.
Swiss qualifier Dominic Stricker prolonged his breakout run by outlasting French wild card Benjamin Bonzi 2-6, 7-5, 7-6 (7/4), 3-6, 6-2.
Rinky Hijikata's improbable ride also continued as the Australian wildcard entrant reached the fourth round with a 6-3, 6-3, 4-6, 6-3 win over China's Zhang Zhizhen.