KEY BISCAYNE, Fla. (AP)—A succession of long rallies Saturday left Serena Williams grunting, stumbling, lunging, squealing, flailing her arms and scolding herself.

Despite all the drama and trauma, she reached the fourth round at the Sony Open by beating Caroline Garcia 6-4, 4-6, 6-4.

Williams is playing in her first tournament after a month-long layoff, and rustiness might explain her 41 unforced errors, including seven double-faults. And the 20-year-old Garcia kept Williams on her heels with deep groundstrokes and serves that topped out at 117 mph.

''I can play a hundred times better,'' said Williams, who is seeking a record seventh Key Biscayne title. ''I really gave myself a tremendous amount of trouble out there. Granted she played great, but I made so many errors ... 40-something errors. It's not the way to play professional tennis. Maybe amateur.''

Three-time champion Novak Djokovic was off Saturday but advanced to the fourth round anyway when his next scheduled opponent, Florian Mayer, withdrew because of a groin injury. Djokovic's next match will be Tuesday.

No. 10-seeded John Isner rallied to win an all-American matchup against Donald Young, 6-7 (5), 6-3, 6-4. Isner is back in the top 10 this week for the first time in 18 months.

Sam Querrey, Ryan Harrison and Jack Sock lost second-round matches. That left Isner as the lone remaining American in the men's draw, reflecting the state of U.S. tennis.

''The state is not the greatest it has ever been,'' Isner said.

Stanislas Wawrinka bounced back from his first loss of the year by beating Daniel Gimeno-Traver 6-0, 3-6, 6-3. No. 7 Tomas Berdych joined Wawrinka in the third round by beating Stephane Robert 7-6 (5), 6-1.

Williams and Garcia engaged in a succession of side-to-side baseline exchanges that had the stadium crowd roaring, and Williams needed 2 1/2 hours to complete the victory. But she finished in a hurry, serving out the final game at love with the help of consecutive aces.

Reigning Wimbledon champion Andy Murray has predicted that Garcia will someday climb to No. 1, but the Frenchwoman is now 0-3 against Williams.

''It's always nice to play against a big player,'' Garcia said. ''You are working and practicing to play this match, because it's in this kind of match you can learn more. But next time I prefer to win.''

The No. 1-ranked Williams is playing for the 14th time at Key Biscayne, an hour from her home in Palm Beach Gardens. She won the event for the first time in 2002 and tied Andre Agassi's record of six titles last year.

Wawrinka hit 33 winners against Gimeno-Traver and shook off some sloppy play midway through the match.

''I was negative in the second set, a little bit stupidly, but then I'm really happy the way I start the third set,'' Wawrinka said. ''First one here, it's never easy. The condition was really slow today, really humid. You need to get through.''

Wawrinka, who won the Australian Open in January, improved to 14-1 this year. His lone defeat came last week in the fourth round at Indian Wells to Kevin Anderson.

He has never reached the quarterfinals in five previous appearances at Key Biscayne, but then he has never been ranked this high.

''I'm No. 2 in the world,'' he said. ''I know that if I play my best tennis I can be a favorite of the tournament. I know how well I can play.''

No. 12 Ana Ivanovic advanced to the fourth round by beating No. 20 Flavia Pennetta 6-4, 6-3. Ivanovic improved to 5-1 this year against Top 20 players.

Angelique Kerber, seeded No. 5, defeated Tsvetana Pironkova 6-0, 6-2, and No. 8 Petra Kvitova beat qualifier Donna Vekic 6-3, 6-4.

No. 14 Sabine Lisicki withdrew because of the flu, giving No. 19 Kirsten Flipkens a walkover. No. 23 Ekaterina Makarova beat No. 9 Sara Errani 6-3, 2-6, 6-4.

Seeded men eliminated included No. 19 Jerzy Janowicz, No. 23 Gael Monfils and No. 25 Marin Cilic, No. 26 Gilles Simon and No. 27 Vasek Pospisil.