(CNN) -- Rafael Nadal's 11-year reign in Barcelona is over.
The world No.1 lost his first match at the Barcelona Open since 2003 as he was knocked out by fellow Spaniard Nicolas Almagro in the quarter-finals.
Almagro, a clay court specialist ranked 20th in the world, saw off Nadal in an intense 2-6 7-6(5) 6-4 victory lasting nearly three hours.
"I had difficulties in the first set and struggled with Nadal's shots," Almagro told reporters in Barcelona.
"I started to hit harder and play more aggressively as the match continued, especially when I had the wind in my back."
Nadal, who lost in the Monte Carlo Masters quarter-finals to David Ferrer last week, had last been beaten in Barcelona when he was just 15 years old.
He had been invincible on Barcelona's clay courts, winning 41 straight matches and eight titles.
But Nadal was philosophical in defeat, saying in his post-match media conference: "I played better than him in the first two sets but I didn't make use of my opportunities.
"This is sport. Sometimes you win and sometimes you lose. Tennis is like this. Now I need to start fighting and thinking about Madrid.
"I can only congratulate Nico now."
Amagro goes on to face Colombian Santiago Giraldo while Latvia's Ernest Gulbis faces Japan's Kei Nishikori in the semi-finals Saturday.
Nadal turns to his preparations for the Madrid Open, which begins on 4th May, as his next tune up for the French Open.
The second grand slam of the season, which the 27-year-old has won a record eight times, begins on 25th May.
After his defeat in Barcelona, Nadal paid tribute to the former coach of the city's football team Tito Vilanova, who died Friday.
"Tennis is just a game," said Nadal. "What really matters today is Tito Vilanova. I want to send all my support and wishes to his family in this sad moment."
In Stuttgart, Maria Sharapova cemented her place in the semi-finals -- and the world's top 10 -- with victory over Agnieszka Radwanska.
Sharapova dispatched the top seed and world No.3 64 63 to stay on course for her third straight victory at the indoor clay court event.
Defeat to Radwanska, who was in Fed Cup action for Poland last weekend, would have seen her drop out of the top-10 for the first time in three years.
"It's a big win for me," Sharapova told reporters in Stuttgart. "Probably the biggest since my injury."
Sharapova was out of action for much of the second half of last season with a right shoulder problem.
Her semi-final opponent is Italy's Sara Errani, who advanced as Carla Suarez Navarro retired with a wrist injury with their match poised at one set all.
The other semi-final sees the battle of former world number ones Ana Ivanovic and Jelena Jankovic.