the fourth round at the BNP Paribas Open on Tuesday, extending her winning streak to 14 matches.
Maria Sharapova struggled mightily, too, losing 3-6, 6-3, 6-2 to defending champion Flavia Pennetta, who won her ninth straight match after becoming emotional and leaving the court in the first set.
Four-time Indian Wells champion Roger Federer defeated Andreas Seppi 6-3, 6-4, avenging his third-round loss to Seppi at the Australian Open.
Seppi fought off three match points on his serve to trail 5-4 in the third set. He netted a forehand to give Federer a fourth match point in the next game, and the Swiss star closed it out with a forehand winner in the corner.
Seppi's win Down Under stopped a 10-match skid against Federer. The Italian broke Federer to tie it up 3-all in the second, but Federer broke back on a forehand winner in the next game to take a lead he never gave up.
"It absolutely was an opportunity right away to play him again and sort of erase it to some extent from the memory as the season moves forward," Federer said. "It's one of those matches you're happy you're through, and I was happy it was over."
Pennetta was happy to advance after working through her emotions, saying she "let everything out, screaming, do something."
"For the first two or three games I was OK," Pennetta said. "Then it's coming. Like I never expect. I never do something like that. Normally you go away and you don't want to stay on the court. But for me it was important to just keep calm and try to play. In the end I just play really well."Pennetta had 34 unforced errors and just 15 winners. Sharapova topped her in both categories with 42 unforced errors and 27 winners to go with 11 double faults.
Pennetta broke two-time Indian Wells champion Sharapova twice in the final set, winning the last seven games.
"She got in a really good rhythm," said Sharapova, who didn't notice Pennetta's meltdown. "Everything I gave her she was able to hit back solid with pace."
Williams committed 52 unforced errors and had nine double faults to go with 13 aces and 31 winners in the up-and-down match played in 90-degree (32 Celsius) heat.
"I'm just trying to find my bearings," the world's top-ranked player said. "Little off this week, but like I said, I'm just happy to be here."
Williams set up match point with a 128-mph ace and won when Stephens dumped a backhand into the net, one of her 36 errors.
Williams broke Stephens three times in the final set of her third match at Indian Wells since ending a 14-year personal boycott of the tournament, where she has won two titles.
"The crowd has been really great," Williams said. "It's been really relaxing here. I just feel I don't want to leave."
Stephens recovered after blowing a 3-1 lead in the first set to dominate the tiebreaker that included just one winner, a smash by Williams to trail 3-2.
Williams has been subdued on court, with none of the screaming and exuberant fist-pumping that often marks her matches.
"That's why I was so calm after I lost (the first set), because it was like, I don't really need to win this title," Williams said. "Just being out here is a real win for me, and I was just calm through it."
Stephens won four of the final five points and then promptly got broken to start the second set. Her double faults in the first game set up both break points, and Williams cashed in on the second one when Stephens' backhand went long.
Stephens held to get to 3-2 before Williams won five straight games to close out the second set 6-2 and take a 2-0 lead in the third. They shared a brief conversation at the net during the post-match handshake.
"I have always thought Sloane can be really great," Williams said. "I think she's on the right track. She played really well. It's good to see her doing really well again."
In third round men's play, Nadal beat Donald Young 6-4, 6-2 in a matchup of lefties.
"I feel confident that I am playing much better than one month and a half ago," Nadal said. "I feel closer to be what I am, what I want to be, and it's a positive victory for me."
Sixth-seeded Milos Raonic beat Alexandr Dolgopolov, 7-6 (2), 6-4; No. 11 Grigor Dimitrov lost to 17th-seeded Tommy Robredo, 6-4, 1-6, 7-5; Jack Sock upset 15th-seeded Roberto Bautista Agut, 3-6, 6-3, 6-2 to earn his first meeting against Federer; and No. 9 seed Tomas Berdych beat Steve Johnson, 6-4, 6-2.
No. 12 Carla Suarez Navarro beat Heather Watson 7-6 (5), 3-6, 6-1 to reach the quarterfinals, where she will play third-seeded Simona Halep, a 6-4, 6-4 winner over 14th-seeded Karolina Pliskova.
Jelena Jankovic, the 2010 champion, outlasted 18-year-old Belinda Bencic, 6-3, 3-6, 6-3, to set up a quarterfinal against qualifier Lesia Tsurenko of Ukraine. She beat sixth-seeded Eugenie Bouchard who had 74 unforced errors in losing 6-7 (5), 7-5 6-4.