"I definitely wasn't able to do everything I wanted to," she said. "Took me some time to kind of get my head around that.

"You have to get disciplined and just try to deal with what's at hand and try to use the tools you have on this particular day," said Williams, who did so with a vengeance.

She broke Jankovic twice to take a 5-4 lead in the second set before the Serb veteran, like Williams a former world number one, broke in the 10th game to pull level at 5-5.

Serving to save the match, Williams was on the ropes in the 12th game but she saved three match points to force the decider.

Once she came through it, she ran away with the third, buoyed by an enthusiastic crowd.

"It ain't over til it's over," she told her ecstatic fans of her determination to stick with it until the end. "And I didn't see no fat lady singing."

Williams, playing her second tournament since her sparkling run to the Australian Open final -- could find herself up next against Coco Vandeweghe, the woman she beat in the semis in Melbourne before falling to her sister Serena in the final.

Vandeweghe was to take on Czech Lucie Safarova later Saturday.

Jankovic, meanwhile, could only regret her missed opportunities, especially her first match point that Williams saved with a volley winner.

"When she was at the net I was supposed to play that cross forehand but I played down the line and right to her and she made a winner," Jankovic said. "I had everything under control and I just let it slip away."

Kerber in control

There was no such drama for second-seeded Angelique Kerber, who raced into the third round with a 6-2, 6-1 victory over fellow German Andrea Petkovic.

Kerber, who is assured of reclaiming the number one world ranking when the tournament ends thanks to Serena Williams' injury withdrawal, reversed a run of poor fortune in the California desert, where she hadn't made it out of her tournament opener since 2011.

"Of course it was not so easy to play against her, we know each other very long," Kerber said.

"I was trying today just to focus more on my side of the tennis court. Just being focused on my game, because I think the last three years I lose here in the first round, so that was also something in my mind that I would like to change this year and just go through it."