KEY BISCAYNE, Florida (AP) — Serena Williams' match was more than an hour old Monday before she began providing a soundtrack for her comeback.

"Come on!" she shouted at her fist through gritted teeth. Her demeanor transformed, Williams rallied past Dominika Cibulkova in the fourth round of the Sony Open 2-6, 6-4, 6-2.

The top-ranked Williams, seeking her sixth Key Biscayne title and first since 2008, was down a service break trailing 4-1 in the second set before she swept the final five games of the set. She also won the last three games of the match and served it out at love with three aces.

"I just felt slow and sluggish," she said. "Then I started hitting errors, and I was getting frustrated. Then I tried not to be frustrated.

"I was just proud of myself because I didn't throw any rackets."

Williams' opponent in the quarterfinals Tuesday will be No. 5-seeded Li Na, who beat wild card Garbine Muguruza 7-6 (6), 6-2.

No. 3 Maria Sharapova, a four-time runner-up seeking her first Key Biscayne title, reached the quarterfinals by beating No. 21 Klara Zakopalova 6-2, 6-2, while America's Sloane Stephens started strong before losing the last nine games to be eliminated by defending champion Agnieszka Radwanska 4-6, 6-2, 6-0.

That spoiled the possibility of a rematch in the semifinals between Williams and Stephens, who pulled off an upset when they met at the Australian Open in January.

Since beating Williams, the No. 16-ranked Stephens is 2-5.

"There's no specific thing that I'd say has happened or is not happening, but I don't think it really matters," she said. "I'm 16 in the world. I can lose in the first round the next two months and I probably would still be top 30. I'm not really too concerned about winning or losing or any of that, I don't think. My life has changed, yeah, but I wouldn't say I'm in a panic or anything."

In men's third-round play, 2009 champion Andy Murray beat Grigor Dimitrov 7-6 (3), 6-3. No. 6-seeded Jo-Wilfried Tsonga defeated Jarkko Nieminen 6-3, 6-3, American Sam Querrey advanced when No. 14-seeded Milos Raonic withdrew because of illness and American John Isner hit 20 aces but lost to No. 9-seeded Marin Cilic, 6-3, 7-6 (3).

Williams was impassive and flat on her feet in the early going against the No. 13-seeded Cibulkova, and the half-empty stands made for a sleepy atmosphere.

"Bor-ing!" one spectator shouted.

Williams said she has learned not to force showing emotion.

"It just kind of has to come," she said. "You can't be yelling, 'Come on!' after 40 unforced errors and you miss another shot. That's not going to necessarily work."

During changeovers, disco, salsa and Coldplay blared from the public address system, and something finally got Williams going. Her shots began landing consistently just inside the lines, and she won 10 consecutive points to surge ahead in the second set.

She let out a yell for the first time when she hit a backhand winner to reach set point, screaming encouragement at herself. The crowd responded with a roar of approval.

Williams won the next point with an ace, and when a replay confirmed the call to seal the set, she hollered again and spiked a spare ball.

Her father and coach, Richard, stroked his chin as he watched the comeback from the photographers' pit.

"I saw my dad on the sideline, and he was so calm and so relaxed," she said. "And I was just like, 'OK, Serena, you can do this.' I took that energy and started playing better."

Williams went ahead to stay by breaking serve at love for a 2-1 lead in the final set. After closing out the victory with a 116-mph ace, she swung her fist in satisfaction.

She acknowledged her demeanor may have seemed odd earlier.

"I look crazy because I'm constantly having an argument with myself," she said. "We're going back and forth and trying to figure things out. I'm talking to myself inside, and she's talking back and giving me lip. I give her a little attitude, and then I tell her she stinks, and she tells me to shut up. We get into it a little bit. Then we get along."

Williams arrived at the tournament site driving her Rolls Royce. She had ridden a bicycle to her previous match, borrowing it at her hotel because traffic gridlock on Key Biscayne made her fearful she might be late, then won easily.

"Maybe I should start riding a bike more often," she said.