Rafael Nadal was unable to conjure a Davis Cup fairytale as he suffered defeat to Botic van de Zandschulp on an emotional evening in Malaga.

The 38-year-old is playing in his farewell tournament having finally accepted last month that his body would no longer allow him to compete at the highest level.

He was still hoping for one final victory on home soil – and that could yet still come if his Spanish team-mates can turn around the quarter-final against the Netherlands to send the home nation to the semi-finals – but Van de Zandschulp spoiled the party with a 6-4 6-4 victory.

It was only Nadal’s second ever Davis Cup loss in singles, with the other coming on his debut against Czech Republic way back in 2004.

But, while the 22-time grand-slam champion will be disappointed with the result, ultimately it was not what really mattered.

The Spanish fans, some of whom had paid seven-figure sums for tickets, flocked to the Martin Carpena Arena in their thousands, draped in red and yellow flags and scarves and ready to cheer on their national hero for perhaps the final time.

Nadal said at a press conference on Monday that he wanted to leave the emotion for when the end came, with his focus on trying to win Spain a sixth Davis Cup title during his long and historic career.

There were tears in Nadal’s eyes during a stirring rendition of the national anthem but his trademark sprint to the back of the court showed that he meant business.

This was only Nadal’s eighth official tournament this season, while his only singles matches since the Olympics in July came in an exhibition event in Saudi Arabia last month.

Captain David Ferrer could not resist giving him the nod, though, and there were glimpses of the old Nadal in some full-blooded forehands; fist pumps and roars greeting every point won.

But Van de Zandschulp is no mug, the Dutchman having been ranked as high as 22 in the world, and a break of serve in the ninth game was swiftly followed by the first set.

Nadal began to look a step off the pace, the collective goodwill unable to prevent him going a double break down in the second.

But this greatest of yellow ball warriors was determined to fight to the end, retrieving one break and trying to claw himself back on level terms.

Carlos Alcaraz, due to play the second match for Spain, took a break from his preparations to watch the last game courtside, determined not to miss the moment.

But there was to be no great recovery, Nadal netting a final forehand before waving and blowing kisses to the crowd, walking off with a final shake of the head.