MELBOURNE, Australia (AP) Nine days ago, Zhang Shuai was nearly on a plane back to China before the Australian Open began. The French veteran Virginie Razzano was serving for the match against her in the final round of qualifying, but Zhang was able to break back and win the third set 8-6 - along with a spot in the main draw.

Now, the No. 133-ranked Zhang, who considered retiring from tennis after a dismal 2015 season, is into the quarterfinals of the season's first major after defeating an injured Madison Keys 3-6, 6-3, 6-3 on Monday.

Keys, who broke through to reach her first Grand Slam semifinal in Melbourne last year, dominated the first set with powerful groundstrokes that Zhang had trouble returning, breaking the Chinese player at love in the opening game of the match.

But she began to feel pain in her left leg early in the second set and, after taking a medical timeout to have her upper thigh wrapped, had difficulty putting any weight on her leg to serve and looked increasingly in pain as the match wore on.

She later said she kept playing because ''One, I hate retiring. Two, you don't want to do that to someone who is trying to get into the quarterfinals.''

At the start of the third set, she broke Zhang to take a 2-1 lead. But the trainer returned soon after to treat Keys' abductor again and she finished the match slicing shots into the court with no power behind them, tears streaming down her face.

''So difficult to concentrate when I saw her feeling very pain, it's so tough (to) continue to play,'' Zhang said in her post-match interview.

But she was also feeling her own pressure to close out the match, without a doubt the biggest of her career.

''Maybe two points you feeling like (she) cannot play, and then next three balls, pong, pong, pong, make two ace, one winner,'' Zhang said. ''So tough. You don't know what's happen.''

The 27-year-old Zhang had lost in the first round of 14 Grand Slams dating back to 2008, and played so poorly last year, she thought the Australian Open might be the final tournament of her career.

Her run continues, though, and she'll get a shot at the semifinals next against Britain's Johanna Konta, her sometimes practice partner.

After waiting so long for one victory, Zhang said, ''this time I'm feeling like maybe God will bless me. Like I'm feeling one time, give me many wins.''

Her retirement is on hold for now, but she has been thinking of her next plan nonetheless.

''I really want to have a coffee bar,'' she said. ''Welcome to everyone to come when I retire.''