KEY BISCAYNE, Fla. - Serena Williams rallied from a break down in both sets Monday to beat Sam Stosur 7-5, 6-3 and advance to the quarterfinals of the Sony Ericsson Open.

Williams matched a career high of 20 aces in the match and avenged a loss to Stosur when they last met in the U.S. Open final in September.

"That wasn't in my mind," Williams said. "I just thought, 'This is a new game."'

Also reaching the quarterfinals was No. 2 Maria Sharapova, who overcame 11 double-faults to beat Ekaterina Makarova 6-4, 7-6 (3).

On the men's side, No. 1 Novak Djokovic advanced to the fourth round by beating No. 27-seeded Viktor Troicki 6-3, 6-4. Djokovic is bidding for his third Key Biscayne title and second in a row.

Williams lost only six points on her first serve, but she had to rally after being broken in the first game of each set against the No. 5-ranked Stosur.

Ranked 11th, Williams is playing in her first tournament since January after being sidelined by a left ankle injury. She seeks her first title since August, and a record sixth Key Biscayne championship.

Williams started slowly, failing to convert her first seven break-point chances. She muscled her way back into the match and also showed finesse, such as when she chipped a forehand drop shot that barely cleared the net for a dainty winner.

Williams' best stroke was her serve. She hit six aces during a 20-point game to hold for 3-2 in the second set. After falling behind love-40 in the final game, she smacked three aces and eventually reached match point.

Her final serve spun so violently it kicked head-high to handcuff Stosur, who could only push the ball wide. A jubilant Williams celebrated her fifth consecutive victory when facing a top-five player.

"I'm really trying so hard," she told the crowd. "My mom gave me the ultimate pep talk last night, so thanks, Mom."

Her sister Venus was to face Ana Ivanovic in the last fourth-round match Monday night. Venus is playing in her first tournament since withdrawing from the U.S. Open last August after being diagnosed with a fatigue-causing autoimmune disease.

"We both have been through a lot," Serena said. "And each match, whether we're beating top-10 player or a top-80 player, we really thoroughly enjoy it and want to do really well."

In other women's play, reigning French Open champion Li Na rallied past Sabine Lisicki 3-6, 6-4, 6-2. No. 5 Agnieszka Radwanska defeated 18-year-old Garbine Muguruza Blanco 6-3, 6-2, and No. 7 Marion Bartoli swept No. 22 Maria Kirilenko 6-1, 6-2.

Sharapova won despite committing 52 unforced errors and losing her serve four times. She seeks her first Key Biscayne title after losing in the final three times.

On the men's side, No. 8-seeded Mardy Fish assured he'll remain the top-ranked American by beating No. 28 Kevin Anderson in the third round, 6-4, 6-3.

Fish has yet to play in the stadium this year and instead faced Anderson at 11 a.m. on the grandstand court, but he said that was fine because prefers an early start.

"I like to know my fate," Fish said. "I like playing in the heat. And I think everyone likes to know exactly when they play."

No. 12-seeded Nicolas Almagro won a duel of Spaniards by beating No. 20 Fernando Verdasco 6-3, 6-4. No. 17 Richard Gasquet defeated Albert Ramos 6-2, 5-7, 6-3.