The No. 3-seeded Federer won 6-3, 4-6, 6-4, 6-2 against Croatia's Marin Cilic, progressing to the fourth round in a men's draw that saw two other players quit when trailing.
No. 9 Tomas Berdych (shoulder) and No. 31 Marcel Granollers (abdominal muscle) retired Saturday, raising the total retirements in men's and women's singles to a record 14 by the third round.
Never before had more than 12 players stopped during a match throughout the course of any entire Grand Slam tournament in the Open era.
"For me, it is shocking to see so many retirements. I have never retired in my whole life, except once when I played against (James) Blake in Paris, but I didn't even walk onto the court. For me it doesn't matter how bad I'm feeling, I will be out there and giving it a try, because you never know what's gonna happen," 16-time major champion Roger Federer said.
"Look, every player feels different," he added. "It's unfortunate it happens." Federer's next opponent will be unseeded Argentine Juan Monaco, who came from a set down to beat Tommy Haas 6-7 (3), 6-3, 6-2, 6-3.
World No. 1 Novak Djokovic won 6-4, 6-4, 6-2 victory over Nikolay Davydenko, a two-time semifinalist at the US Open. After improving to 60-2 in 2011, Djokovic delighted the crowd by showing off some dance moves on court while music blared over the stadium loudspeakers.
"I know most people expect top players to get to the late stages of the tournament, so there's extra pressure on us," said Djokovic, seeking his first title at Flushing Meadows after runner-up finishes in 2007 and 2010. "But it's a challenge we're ready to accept. This is what we work all our lives for, to be on this court." American Mardy Fish, seeded eighth, also moved into the fourth round with a 6-4, 7-6 (4), 7-6 (3) win over South African Kevin Anderson. Fish's next task will be Jo-Wilfried Tsonga, who beat Fernando Verdasco 6-3, 7-5, 6-4.
In the women's draw, No.1 Caroline Wozniacki had a comfortable 6-2, 6-4 win over American Vania King. The Dane will face a higher hurdle in her next match, against former champion Svetlana Kuznetsova, who was a 6-4, 6-2 winner over Akgul Amandurova.
No. 7 Francesca Schiavone defeated Chanelle Scheepers of South Africa, 5-7, 7-6 (5), 6-3 to set up a clash with Russian Anastasia Pavlyuchenkova; a 6-4, 6-4 winner over former world No. 1 Jelena Jankovic.
No.10 Andrea Petkovic also moved into the round of 16 with a 6-4, 6-0 thrashing of Roberta Vinci, and in the fourth round will take on Carla Suarez Navarro, who took an all-Spanish match against Silva Soler-Espinosa 6-0, 6-4.
Also progressing was Serena Williams, who was dominant early and closed out a straight sets win over No. 4 seed Viktoria Azarenka 6-1, 7-6 (5).
That set up an intriguing fourth-round match with Ana Ivanovic. The Serb appears to belatedly be getting back to the form that once carried her to the No. 1 ranking, beating American teenager Sloane Stephens 6-3, 6-4.
Williams may be seeded an unfamiliar No.28 but she showed why so many still regard her as the title favorite, racing to a 5-0 lead inside 17 minutes against an accomplished player like Azarenka.
"What's it like? It's painful," said Azarenka, who won eight points in those opening five games. "To have somebody just going at you like that, it's a little bit painful." Eventually, though, Azarenka straightened her own play out enough to make things interesting in the second set. She erased four match points, broke when Williams served for the match at 5-3, and left Williams saying she wasn't pleased.
The 29-year-old American already owns 13 major championships, including three at the US Open, which is why, when she was asked how she can play so well now, Williams replied: "I was a pretty good player before. So just trying to get back into that rhythm and feel it again." Ivanovic was looking forward to being back in the Grand Slam spotlight for the big match against Williams.
"It's exciting, at least for me. She's the hottest player out there at the moment. She's been playing so well lately.
It is going to be a good challenge," Ivanovic said.
Ivanovic acknowledged that Williams will be the "favorite, that's for sure" but also said: "I know I can give her a tough match. She beat me in the past, but maybe I can go for revenge on Monday." The 6-foot-6 Cilic caused some problems with his wingspan, and when he hit a big forehand that Federer couldn't get back, they were tied at a set apiece.