Dominic Thiem inflicted Rafael Nadal's first defeat on clay since the Austrian's victory over him in Rome last year to reach the semi-finals of the Madrid Open, meaning Roger Federer will return to world number one.

Nadal went into Friday's contest having won 50 successive sets on the red dirt since his loss to Thiem at the Internazionali d'Italia last May.

But that remarkable streak was brought to a close as Nadal surrendered the opener, and Thiem refused to let the momentum slip as he delivered a stirring second-set showing to win 7-5 6-3.

Last month's quarter-finals in Monte Carlo had seen Nadal demolish Thiem 6-0 6-2, but the world number seven was inspired on this occasion.

Federer will therefore move back to the top of the rankings, despite taking the clay-court season off, but of more consequence is a performance from Thiem that suggests Nadal may have a genuine rival at the French Open.

Nadal had to save two break points in the opening game of the match but Thiem did not waste his next opportunity when further signs of vulnerability emerged in the seventh game.

A routine forehand was sent into the net to hand Thiem a break point, which he took courtesy of a fierce forehand that proved too hot for Nadal to handle.

But Thiem looked to have cracked under the pressure of potentially taking a set from the 'King of Clay' when he let slip a set point and then fired long twice in succession to hand the break back.

Yet what followed was an uncharacteristically sloppy service game from Nadal and Thiem made no mistake in capitalising, claiming the initiative once more as the Spaniard failed to clear the net with a point-blank forehand.

Thiem held his nerve to seal the set with an ace and he refused to let his foot off the pedal in the second.

Nadal staved off four break points in the third game, but surviving a fifth proved beyond him, an off-balance forehand leaving him trailing once more.

Further evidence that this was to be Thiem's day came as he fought back from 15-40 down in the next game to hold thanks to a magnificent drop-volley and an unreturnable serve, only to then allow Nadal to level at 3-3 with an errant forehand.

However, parity was short-lived. Nadal fired long off his backhand side to once more go a break behind and there would be no chance for another reprieve as Thiem held to love before a searing cross-court forehand wrapped up the contest, his excellent performance serving as a reminder that the King is indeed beatable on clay.