Argentina's Diego Schwartzman outlasted Dominic Thiem in a brutal claycourt war of attrition to prevail 7-6(1) 5-7 6-7(6) 7-6(5) 6-2 and reach his first Grand Slam semi-final at the French Open.

Schwartzman had never beaten a top-five player at a Grand Slam and had lost his three previous quarter-finals, including one at the French, but the 28-year-old was relentless in his pursuit of victory.

Both players appeared to be running on empty at times as they slugged out endless rallies from the baseline for five hours and eight minutes on a windy Court Philippe Chatrier.

Third seed Thiem, the US Open champion, saved a set point in the third before moving two sets to one ahead and when Schwartzman saw three more set points disappear at 5-4 in the fourth, the third one after a sensational running forehand winner by Thiem, it appeared he was going to fall short again.

But the 12th seed showed incredible resilience to come back from 3-1 down in the tiebreak and drag it into a final set.

Schwartzman looked the fresher player in the decider and Thiem, who was bidding to reach a fifth successive French Open semi-final, began to look ragged as he dropped serve to love in the sixth game with a netted backhand.

After so many momentum shifts in a gruelling contest featuring 19 breaks of serve, a Thiem comeback was still on the cards but Schwartzman was rock solid in the closing straight, sealing arguably the biggest win of his career when Thiem dumped a weary-looking dropshot into the net.

Schwartzman will have to recover quickly as 12-times French Open champion Rafa Nadal could be waiting in the semi-final if he overcomes Italian teenager Jannik Sinner.

If that is the case he will go in with confidence having beaten the Spaniard on his way to the final of the Rome Masters in the build-up to Roland Garros.