"I had a good start," Williams said. "You can't go in against the fifth-ranked player with your mind everywhere. You have to be serious. It's a great win for the hardcourt season."

Playing in just her third tournament since winning Wimbledon last year, and her first on American soil since the 2009 U.S. Open, Williams looked as good as she did when she topped the rankings.

"I'm a better player this month than I was last month," Williams said. "I've put in a lot of work and I hope it continues to pay off."

The fifth-ranked Sharapova had eight unforced errors before she hit her first winner and the slow start cost her in the battle of former No. 1s.

"It certainly wasn't my night," Sharapova said. "She was serving and hitting so well and I was extremely late in my reactions. I felt sluggish. It was a bad day but it's also a reminder that I need to step up."

Williams, ranked No. 169, beat Sharapova for the sixth straight time and improved to 7-2 overall against her.

"I consider anybody I play to be an intense rivalry but we do have a good thing going," Williams said. "It's exciting and it's good for tennis."

Sharapova last defeated Williams in the finals of the 2004 WTA championships.

"When I had chances to change things around I couldn't do it," Sharapova said. "Her biggest strength is her power and you don't see so much of that in the top 10. It really makes her dangerous."

Germany's Sabine Lisicki knocked off her second straight seeded opponent, beating fifth-seeded Agnieszka Radwanska of Poland 7-6(4), 2-6, 6-2. She will meet Williams in the semifinals.

Lisicki was a semifinalist at Wimbledon and has improved her ranking to 26th after being No. 218 in March.

"I'm looking forward to the match," Lisicki said. "I love competing in the big matches. I have nothing to lose."

Sharapova beat Lisicki in the semis at Wimbledon.

"Coming from grass to hardcourt is always a challenge," Lisicki said. "It comes down to who plays the best that given day."

Last year, Lisicki missed five months with a left ankle injury. She says she has more endurance now than before her injury.

"I'm much better than I was before the injury," she said. "I've had to focus on so many aspects of my game. Last year I couldn't even walk. Now I feel I can rely on my serve when I need it at crucial moments."

Lisicki recorded 14 aces to Radwanska's seven.

The 14th-ranked Radwanska was a semifinalist at Stanford last year. She's still looking for her first tour title since 2008.