San Jose, CA, USA, 3 August 2018 | AAP

Australia’s Ajla Tomljanovic has advanced to the quarterfinals of the Silicon Valley Classic after rallying to defeat Poland’s Magdelena Frech in three sets.

The world No.64 took an early lead but dropped the second set before prevailing 6-4 3-6 6-3 in a match lasting more than two hours.

The 25-year-old will now face Romanian fifth seed Mihaela Buzarnescu in the last eight.

Buzarnescu beat teenaged qualifier Amanda Anisimova 7-5 2-6 6-1.

Tomljanovic was originally scheduled to face defending champion Madison Keys in the second round until the American was forced to withdraw due to pain in her right wrist.

The hard-hitting 23-year-old, runner-up at last year’s US Open where she lost to fellow American Sloane Stephens, is ranked 12th in the world and was the second seed in San Jose.

“I am really sorry to have to pull out of the Mubadala Silicon Valley Classic,” Keys said.

“I have been feeling pain in my wrist over the last couple of days and felt worse today. This event is one of my favourites and I was looking forward to playing here in San Jose.”

Keys was the highest remaining seed after Spaniard Garbine Muguruza withdrew on Wednesday due to a right arm injury.