Maria Sharapova Caroline Wozniacki US Open
Maria Sharapova and Caroline Wozniacki shake hands after their fourth round match at the US OpenReuters

Grand slam king Roger Federer came back with renewed vigour after a weather delay to rout Spaniard Marcel Granollers 4-6, 6-1, 6-1, 6-1 and charge into the fourth round of the US Open on Sunday.

The 42nd-ranked Granollers surprisingly led the second-seeded Swiss 5-2 when lightning and heavy rains suspended their afternoon match at Arthur Ashe Stadium.

After play resumed a couple of hours later, the 17-time Grand Slam winner Federer conceded the first set and trailed 1-0 in the second before taking 18 of the next 20 games to secure victory.

"I was able to come back and turn it around, because Marcel started really on fire," the 33-year-old Federer told the crowd. "I'm happy the break helped me and I came out and played some great tennis."

Five-time US Open winner Federer will next play 17th seed Roberto Bautista Agut of Spain, who beat France's Adrian Mannarino 7-5, 6-2, 6-3.

Federer holds the all-time men's record for most Grand Slam singles titles but has come up empty over the last eight dating back to the 2012 Wimbledon tournament.

With his nemesis Rafael Nadal, the 2013 US Open champion, missing the tournament with a wrist injury and the Swiss playing in the softer side of the draw, this could be a great chance for Wimbledon runner-up Federer to add to his record total.

Federer said he is feeling great and looking forward to this opportunity in his 60th successive Major appearance.

"It's been really excellent the last three matches here at the US Open," said Federer, who lost his first set of the tournament against Granollers. "I feel very explosive, quick. The coordination is there as well. I feel like I've gotten used to the hard courts by now. It's really working well. I'm very pleased.

"I'm happy I wake up every day and I'm ready to go. I think when you keep yourself in shape and train the right way, that's how you do it ... it's become a game of movement."

Meanwhile, Caroline Wozniacki upset French Open champion Maria Sharapova in a groundstroke marathon to reach the quarterfinals, while Gilles Simon registered the first big surprise in the men's draw on Sunday.

France's Simon, the 26th seed, defeated Spanish fourth seed David Ferrer, who became the first top 10 men's seed to be shown the exit when he fell 6-3, 3-6, 6-1, 6-3 in the third round on a hot, humid day at Flushing Meadows.

But it was the women's fourth-round matchup between Sharapova and Wozniacki that stole the show at the US National Tennis Center.

The 10th-seeded Wozniacki, who ruled as world number one for 67 weeks but never won a Grand Slam crown, showed great grit in battling to a 6-4, 2-6, 6-2 victory over fifth seed Sharapova in a two hour 37 minute slugfest in sweltering conditions.

Victory sent the 24-year-old Dane to her first grand slam quarterfinal since the 2012 Australian Open, a stretch of 11 events, with Italy's Sara Errani awaiting as her opponent.

Errani, the 13th seed, ended the rejuvenated run of 32-year-old Mirjana Lucic-Baroni of Croatia 6-3, 2-6, 6-0 in their fourth-round match.

Wozniacki used her stellar footwork and notable fitness to stymie Sharapova, who was forced into a slew of 20-stroke rallies that fit the Dane's game plan.

Wozniacki, who is in training to run this autumn's New York City Marathon, won the hard-fought first set by breaking Sharapova in the last game.

Sharapova dominated the second set to level the match at one set apiece when officials gave the players a 10-minute break invoking the heat rule.

Once they returned to the court, Wozniacki took charge.

The critical break in the third set came after a spectacular point when Wozniacki three times raced across the baseline to retrieve in miraculous fashion, with Sharapova netting a backhand volley on the last shot to fall behind 3-1. Wozniacki broke Sharapova again for good measure in the final game.

A slew of upsets on Wozniacki's half of the draw make her possible passage to the final a bit less daunting with second seed Simona Halep, fourth seed Agnieszka Radwanska and sixth seed Angelique Kerber already removed.

"It means so much to me," she told the Arthur Ashe Stadium crowd. "It's been a bit up and down year for me. To win against a champion like Maria is an unbelievable feeling."