WATCH: David Ferrer lays down his bandana in Barcelona farewell

WATCH: David Ferrer lays down his bandana in Barcelona farewell

The 37-year-old Spaniard fell to Nadal, 6-3, 6-3, in the Barcelona round of 16 on Thursday.

On Thursday, soon-to-be retired David Ferrer played his final Barcelona match, falling to countryman Rafael Nadal, 6-3, 6-3.

37-year-old Ferrer is set to retire from the sport next month at the Madrid Masters 1000. He made the announcement at the US Open last August.

During his 19 years on the ATP Tour, the former world No. 3 won 27 titles, including the 2012 Paris ATP Masters 1000 trophy. In 2013, he reached his first and only Grand Slam final at the French Open. He also reached the Australian Open semifinal in 2011 and 2013, the semis of US Open in 2007 and 2012, and the Wimbledon quarterfinals in 2012 and 2013.

After hanging up his racquet, Ferrer hopes to captain his country's Davis Cup team.

“I would be very proud to be able to be Davis Cup captain,” he said. “I also understand that this is very far away and there are players who are ahead. First, I have to train as a professional in coaching.”