Staring down a one set, one-break deficit, Maria Sharapova was in no mood for a pity party. The French Open champion pounded her fist against her left thigh as if inciting her body into action, then proceeded to punish Garbine Muguruza in a spirited comeback.

Shaking off the rust, Sharapova found her range and reeled off 12 of the final 13 games to dispatch the powerful Spaniard, 4-6, 6-3, 6-1.

The match was a rematch of this year's Roland Garros quarterfinals. Muguruza blasted past world No. 1 Serena Williams in a second-round stunner in Paris, then won six of the first seven games against Sharapova before the Russian rallied for a 1-6, 7-5, 6-1 triumph.

The former No. 1 knew what she was in for as she took the court for her first match in nearly five weeks. Rust was evident at the outset as Sharapova slapped a double fault to open before spitting a second double fault to donate serve at love. Muguruza held for 2-0, but if Sharapova had French Open flashbacks she didn't show it. Fighting through a grueling 12-minute game, Sharapova fended off four break points before finally holding for 3-2. She spent the subsequent changeover with an ice towel wrapped around her neck. Muguruza was just getting warmed up.

Hammering her topspin forehand, Muguruza earned triple break point to open the seventh game, but Sharapova responded with a slick drop shot, ace, and body serve to erase all three. Stubbornness can be a Sharapova strength, but sometimes it's a shortcoming on serve. Rather than add spin to her first serve—and deny Muguruza the pace she was craving—Sharapova continued to fire it flat with minimal net clearance. The result was a three double-fault game as she dropped serve to fall behind 3-4. Coach Sven Groeneveld came out on the ensuing changeover, knelt in front of his charge, and urged Sharapova to forgo the quick fix in favor of placement on serve and work the point. "You have to work for this. Get your rhythm," Groeneveld said.

It didn't come immediately. Muguruza saved a break point, then served out the 61-minute opener when Sharapova fired another flat forehand into the bottom of the net.

Spraying successive double faults to face break point, Sharapova sailed a forehand deep as Muguruza broke for a 2-1 second-set lead with a clenched fist. The celebration was short-lived. Sharapova exploited two double faults, rallying from 15-40 down to break back for 2-2.

The pivotal swing in the match arrived at 30-all in the next game. Lacing the outer edge of the center stripe with a bold second-serve ace, Sharapova earned game point, then held for 3-2. That sequence empowered her. Dialing in her return, the two-time French Open champion drilled a forehand return down the line to break for 4-2. Finding her range on serve, Sharapova served out the 37-minute second set at love, hitting more than twice as many winners (12 to five) as her opponent.

Penetrating the court with fast, zooming drives, Sharapova scalded another forehand down the line to break for 1-0 in the decider and was fully engaged while her opponent was fading. Stepping into the court, Sharapova struck with more authority and Muguruza lost the plot on her forehand as the lead stretched to 4-0. It took a three-ace game for Muguruza to stop the rot and hold for 1-4. But it was too little, too late.

Sharapova, who served just 47 percent with seven double faults in the first set, served 78 percent with four aces in the final set.