New York Cosmos striker Raúl has announced he will retire at the end the season, calling time on a 21-year professional career that rates among the finest in the history of Spanish soccer.

The longtime Spain and Real Madrid captain rose to global prominence during a 16-year career at the Bernabéu, leading the club to six La Liga titles, three Champions League titles and four Spanish Super Cups. He also scored 44 goals in 102 appearances for Spain.

“When I signed for the New York Cosmos in December, I said I would evaluate how I felt towards the end of the year and assess whether I would continue to play,” Raúl said Thursday. “My decision is to retire from playing at the end of this season. I am fully focused on finishing the season strong and helping the New York Cosmos win the NASL championship. In the coming months I will decide the next step in my career.

“Playing soccer has been part of my life for so long and the decision to retire is not an easy one but I believe it is the right time. I’m thankful to everyone who has supported me throughout my career and I look forward to playing my final games with the New York Cosmos over the coming weeks.”

The 38-year-old striker, who left Madrid in 2010 as the club’s all-time leading goal-scorer, had later spells with German club FC Schalke 04 and Qatar’s Al-Sadd Sports Club before last year signing with the Cosmos of the North American Soccer League, the division below Major League Soccer.

He’s scored seven goals in 26 appearances for the Cosmos, who currently sit top of the combined NASL table with 50 points from 28 matches played, and could make his final professional appearance on 7 November in the Cosmos’ semi-final playoff match against at MCU Park in Coney Island against an opponent to be determined.

“Raúl is one of the world’s most iconic players,” Cosmos head coach Giovanni Savarese said Thursday, “I knew when we signed him what he would bring on pitch but his knowledge, passion, professionalism and commitment has exceeded my expectations.

“In less than a year, Raúl has become a big part of the team and he will always remain part of the Cosmos family.”

Raúl’s deal with the Cosmos included a stipulation allowing for him to take over the running of the club’s academy after his retirement.