Jiri Lehecka claimed a memorable win over one of tennis' greats as he downed Rafael Nadal at the Madrid Open.

Nadal's farewell appearance at the tournament he has won five times came to an end with a 7-5 6-4 defeat on Tuesday.

The 22-time grand slam champion had been hoping to tee up a quarter-final against Daniil Medvedev.

Ultimately, though, world number 31 Lehecka was the man who progressed.

Lehecka ruined the hopes of the Nadal fans packed into the stands in the Spanish capital, and took control when he reeled off 10 straight points to take the opening set.

Nadal won the Madrid Open in 2008, 2010, 2013, 2014 and 2017, and said farewell to the crowd in an on-court interview following his defeat.

Data Debrief: Nadal falls short of milestone

Nadal had been hoping to win his 60th match at the Madrid Open, while he would have reached his 100th ATP Masters 1000 quarter-final had he won. This was his first defeat to a player ranked lower than 20th in the world since he went down to Pablo Cuevas in 2016.

Lehecka, meanwhile, will make his second appearance in the last eight of a Masters 1000 event.