The 39-year-old, Iker Casillas who holds the record for most Champions League clean sheets and most clean sheets for Spain, spent the last five years of his career playing for Porto after his 25-year spell with Real ended in 2015.
Casillas won the World Cup, two European Championships, five La Liga titles and three Champions League trophies during an illustrious career.
Iker Casillas also lifted the Supercopa de Espana four times, the UEFA Super Cup twice and the FIFA Club World Cup during his time in the Spanish capital.
After moving to Portugal at the age of 34, Iker Casillas continued to win more silverware, winning the top-flight Primeira Liga in 2018 – although he did not feature last season as Porto won the league-and-cup double.
Casillas, who recovered from a heart attack in 2019 and declared his intention to run for the presidency of the Spanish Football Federation in February, posted an emotional message on Twitter confirming his retirement.
“The important thing is the path you travel and the people who accompany you, not the destination that it takes you,” Casillas said
“Because that with work and effort comes alone and I think I can say, without hesitation, that it has been the path and the dream destination.”
Real captain Sergio Ramos reacted to the news by posting: “Soccer thanks you, friend. Forever a legend @IkerCasillas.”
Real hailed Iker Casillas as the club’s greatest goalkeeper and one of their finest players.
“Real Madrid wants to show its appreciation, admiration and affection for one of the greatest legends of our club and world soccer,” read a statement on the Spanish champions’ website.
“The best goalkeeper in the history of Real Madrid and Spanish football came to our house when he was nine years old.