Novak Djokovic battled to a 17th consecutive victory over Kei Nishikori to keep his bid for the calendar Grand Slam on track.
Not since a semi-final win over the Serbian in New York in 2014 had Nishikori got the better of Djokovic, and he won just two games at the Olympics in Tokyo earlier this summer.
The Japanese player won the first set in Arthur Ashe Stadium to threaten a huge upset but Djokovic roared his way to a 6-7 (4) 6-3 6-3 6-2 victory and a place in the fourth round.
Djokovic looked to be feeling the weight of history throughout his run to the Wimbledon title but was good enough in the moments that mattered to become the first man for more than half a century to win the first three grand slam titles of the year.
His hopes of a Golden Slam went up in smoke at the Tokyo Olympics but the title here is the biggest prize and there were again signs of tightness from Djokovic in the opening set.
He recovered an early break but Nishikori, who at his best is one of the few players who can match Djokovic’s clean hitting from the baseline, came out on top in the tie-break.
Djokovic stepped up a gear with a break of serve for 2-1 in the second set, roaring with delight, and then saved five break points to preserve his advantage.
He wobbled from 4-1 up in the third, serving two double faults in a row as Nishikori broke back, but Djokovic forged ahead again immediately and was simply too strong in the fourth.
The top seed said: “I don’t think I started off very well, I was quite passive. I was still trying to find the rhythm. Obviously he played much quicker and more aggressive than my opponents in the first two rounds.
“In the beginning of the second set I already felt like I was getting the groove back. I was very pleased with the focus. Maybe at some points I wasn’t at my best but overall I was determined, I was concentrated, and that’s what matters in the end.”
Sixth seed Matteo Berrettini, the man Djokovic defeated in the Wimbledon final, was pushed all the way by in-form Belarusian Ilya Ivashka but came through 6-7 (5) 6-2 6-4 2-6 6-3.
In the last 16, the Italian will face one of the tournament's surprise packages in German Oscar Otte, who showed his talents in a five-set battle with Andy Murray at Wimbledon and progressed after a four-set win over Andreas Seppi.
With Otte’s countryman Peter Gojowczyk and Dutchman Botic Van De Zandschulp also into the fourth round, it is the first time three qualifiers have made it this far at a slam for more than 25 years.
There have already been 30 five-set matches in New York this year, with the latest seeing 20-year-old Jannik Sinner quell a comeback from Gael Monfils to win 7-6 (1) 6-2 4-6 4-6 6-4.
Monfils delighted the crowd by battling from 4-0 down in the fourth set to force a decider but Sinner again showed his competitive toughness by coming out on top.
Seventh seed and 2020 quarter-finalist Denis Shapovalov crashed out to South African Lloyd Harris, going down to a surprise 6-4 6-4 6-4 defeat.
Fourth seed Alexander Zverev booked his spot in the fourth round after Jack Sock retired in the fourth set of their match on Arthur Ashe.
Sock won the first set, but received treatment early in the second and had to call time with Zverev winning 3-6 6-2 6-3 2-1.
Zverev said on court: “If Jack had kept on playing the way he was doing in the first set, I would have been done in an hour and a half and been planning my holidays and having a good time next week somewhere in the south of France.”