STANFORD, Calif. (AP) -- Even after injury and inactivity, Serena Williams expects to be at her best.
She'll need to be in her next match.
Williams beat Russian Maria Kirilenko 6-2, 3-6, 6-2 Thursday at the Bank of the West Classic to set up a quarterfinal match with Maria Sharapova in a battle of former world No. 1s.
"I'm sure we'll both go out and do the best each of us can,'' Williams said. "It's nothing personal. It's my job and I want to get paid. I leave it on the court.''
Williams is playing her third tournament since winning at Wimbledon last year, and the first tournament on U.S. soil since the 2009 US Open. She missed nearly a year following right foot surgery. She also had blood clots in her lungs, and another surgery to remove a pool of blood under her skin.
She took a medical timeout during her match against Kirilenko to get her left ankle retaped after a blister formed.
Kirilenko took advantage to win the second set and take the first game of the third.
"I was a little sluggish out there,'' Williams said. "I got upset and started playing well enough to win. I started out fine but after that injury timeout I was sluggish.''
Williams said she won't be happy against Sharapova, the Wimbledon finalist, unless she wins. That's her mindset every time she takes the court.
"If I say I just want to play well, it's a lie,'' she said. "Would I be happy about losing? When I'm playing I get a little psycho and on the edge.''
She is trying to be patient with herself during her comeback, and hasn't set any goals concerning the US Open.
"That's a long way off,'' Williams said. "It's about the climb, you know, and not a matter of how fast you get there.''
In another match, New Zealand's Marina Erakovic stunned top-seeded and defending champion Victoria Azarenka of Belarus 4-6, 7-5, 6-2 to reach her second quarterfinal of the year.
The 121st-ranked Erakovic, a qualifier, recorded her first win over a top-20 opponent and has won 24 of her last 28 matches.
"Coming in I knew I had to be the aggressor and try to dictate the pace,'' Erakovic said. "I knew the court and I felt like I was hitting the ball well.''
The fourth-ranked Azarenka reached the semifinals at Wimbledon in her last tournament.
Germany's Sabine Lisicki knocked off fourth-seeded Samantha Stosur, 6-3, 7-5. The 26th-ranked Lisicki recorded 13 aces during the match to reach her fourth quarterfinal of the year.
Japan's Ayumui Morita recovered to beat qualifier Urszula Radwanska of Poland 4-6, 7-5, 6-1 and will next face Marion Bartoli.
Azarenka had won 33 of her previous 40 matches before falling to Erakovic. She suffered her first two-match losing streak since February and just her second of the year.
The 23-year-old Erakovic, born in Croatia, qualified for the main draw at Wimbledon and won her first round match. She also qualified for the French Open.
After missing six months due to a hip injury in 2009, Erakovic returned to the ITF circuit, where she has won 12 singles titles.
"I went into a slump just before the injury and was beginning to question whether this tennis thing was for me,'' Erakovic said. "The injury made me realize how much I love tennis and that's when I committed myself. Coming back I feel like I can compete with the best.''
Erakovic opened this year 3-4, failing to qualify for a pair of tournaments and losing in the first round of two others. She went back to the ITF circuit in late February, winning three titles in five weeks before making her run at Roland Garros.
"You want to get in a lot of matches and that's a good place to go when you're not feeling your game,'' Erakovic said. "Even in the ITF the girls are good. The girls can hit the ball.''
She's currently ranked as high as she's been since her injury.