Maria Sharapova felt her aggression was key as she fought to a 6-4 4-6 6-1 victory over Ekaterina Makarova in the second round of the China Open.
The five-time major winner earned a straight-sets victory over Makarova in just her second match back from a 15-month doping ban in Stuttgart in April, but she found the going much tougher in Beijing.
After losing the opening game on serve, the former world number one reeled off four in succession to take a first set that ended with four straight breaks.
Makarova raced into a 4-1 lead in the second before forcing a decider, in which Sharapova stepped up a gear to set up a meeting with second seed Simona Halep, who will be out for vengeance after her first-round US Open defeat to the 30-year-old.
"I thought the level of tennis was quite high," said Sharapova.
"We had a few breaks in the first [set]. I felt that despite losing that second set, I was motivated to start the third.
"I was the more aggressive player in the end. I started reading her patterns and a little bit of everything I think helped me win."
Halep was handed passage to the third round when Magdalena Rybarikova retired at 6-1 2-1 down due to illness.