has lost what is potentially the final match of his illustrious career.
The former world No. 1 had an astonishing 29-1 record in Davis Cup matches, losing his first-ever match and winning the next 29 in a row.
But his streak came to an end as he suffered a 6-4 6-4 defeat to Botic van de Zandschulp in Spain's quarter-final tie against the Netherlands.
It puts the Dutch squad 1-0 up and leaves Nadal's fate in Carlos Alcaraz's hands. The world No. 3 will face Tallon Griekspoor in the second singles match.
If he can win it and force a decisive doubles rubber, Alcaraz will be back out alongside Marcel Granollers to face Van de Zandschulp and Wesley Koolhof, who is also retiring at this tournament. Spain will be back in action on Friday if they come from behind to beat the Netherlands.
Nadal was visibly emotional as he stepped out for possibly his last-ever match on Tuesday afternoon. The 22-time Major winner teamed up during Spain's national anthem and looked overwhelmed as the crowd erupted into cheers and chants of his name.
Van de Zandschulp played a shaky first game when play got underway, throwing in multiple double faults as he appeared to be struggling with the weight of the occasion. But he got out of the game to stay level with the Spaniard and quickly grew into the match.
The first set was neck-and-neck for the first four games. But Nadal found himself in trouble serving at 4-4. The 38-year-old dropped his intensity and found himself facing two break points.
He saved the first but Van de Zandschulp fired down a stunning passing-shot winner to break and quickly took the opening set 6-4. Things went from bad to worse for Nadal, who was broken in the first game of the second set.
He was under more pressure at 0-2 down but suddenly sprung into life, showing flashes of his vintage self as he got on the board, chasing down a lob and getting the ball back into play before the world No. 80 sent a return long.
Despite struggling on his serve, Van de Zandschulp was red-lining in the rallies while Nadal struggled with his volleys and found himself out-manoeuvred by the Dutchman and was broken again to trail 1-4.
But the retiring Spaniard refused to go down without a fight. He finally had his first chances to break and, after a 10-minute game, he pounced to close the gap with his opponent.
He saved a break point to get to 3-4, winning back-to-back games for the first time, and the fans inside the arena erupted. Nadal had another opening at 0-30 on Van de Zandschulp's serve but the Dutchman quickly silenced the crowd, firing down aces to hold on and put himself within a game of victory.
Nadal kept himself alive, securing potentially the last service hold of his career. But Van de Zandschulp broke Spanish hearts, getting his first and last win over the former world No. 1. Nadal stepped out, waving to the fans in Malaga - maybe for the last time.
It puts the Netherlands 1-0 ahead. Spain will need to win the next two matches to reach the semi-final.
Afterwards, Van de Zandschulp said: "I have to say in the beginning, I think we were both nervous. I have to say the first service game didnt go smoothly. The crowd was tough of course but understandable.
"That's what it is to play here in Spain against Rafa. I think he's the biggest sportsman here in Spain that ever lived. So it was a really special event."
You may also like
Naxal Vikram, wanted in Karnataka and Kerala, shot dead in Udupi
Bob Geldof defends Band Aid's impact as fundraising single turns 40
A 'few minutes' of one daily exercise can boost brain health, new study says
Both Meitei & Kuki groups bin move by Manipur NDA MLAs
Zoe Ball 'really touched' as she breaks silence after quitting BBC Radio 2 Breakfast Show