Maria Sharapova positioned herself as a contender for Roland Garros by defeating reigning French Open champion Jelena Ostapenko in the quarter-finals of the Internazionali BNL d’Italia in Rome.

The Russian went into last week’s Madrid Open on a four-match losing streak and ranked 52nd in the world but, after making the last eight there and Friday’s 6-7 (6/8) 6-4 7-5 victory, she will break back into the top 30 and be seeded for the French Open, which starts a week on Sunday.

Sharapova is a two-time champion at Roland Garros and getting back on the clay has helped the 31-year-old rediscover some form of old.

This was a contest between two of the biggest hitters and feistiest competitors on tour, and in the opening stages it was Ostapenko who was firmly on top.

The Latvian powered her way into a 5-2 lead and held four set points but Sharapova dug in and reeled off four games in a row, only to miss the chance to serve out the set.

Ostapenko saved a set point to take the tie-break but could not quite maintain the same level in the second set, which Sharapova claimed to force a decider.

The Russian seemed in control at 5-2 but back came Ostapenko, a double fault costing Sharapova as she served for the match at 5-3. She then missed two match points in the next game as Ostapenko levelled at 5-5 but Sharapova was not to be denied, taking the next two games to reach the last four.

Defending champion Elina Svitolina was impressive earlier in a 6-4 6-4 victory over Angelique Kerber, winning the final four games of the first set.