Spain's World Cup-winning captain and goalkeeper Iker Casillas announced his retirement from the professional game at the age of 39 on Tuesday.
The former Real Madrid skipper had called time on his five-year spell with side Porto in July after his contract with the Portuguese club expired.
Casillas had suffered a heart attack during a training session last year and has not played any competitive football since April, 2019.
"The important thing is the path you travel and the people who accompany you, not where it takes you, because that comes with work and effort alone, and I think I can say, without hesitation, that the path I have taken is the one I dreamt about #Thanks," Casillas said on Twitter.
Casillas was given a role on Porto's technical staff at the start of last season and was included in the first-team squad, although he was never named in a matchday squad.
He captained Spain's 'golden generation' that won a maiden World Cup title in 2010 as well as two consecutive European Championships in 2008 and 2012.
The shotstopper, who came through Real Madrid's youth system, made his senior club debut in 1999 at the age of 18 and went on to make 725 appearances over 16 seasons, winning five La Liga titles and the Champions League three times.
However, he made a tearful exit without any fanfare in 2015 when he announced his departure from his boyhood club at a news conference, a move for which Real were heavily criticised and led to fans chanting for club president Florentino Perez to resign.
"The best goalkeeper in the history of Real Madrid and Spanish football joined us at the age of 9," Real Madrid said in a statement on Tuesday.
"He was formed here and defended our shirt for 25 years, becoming one of our most emblematic captains of all time. Iker Casillas earned the love of madridismo and is a symbol of the values that Real Madrid represents."
Casillas holds the record for most appearances in the Champions League, featuring 177 times -- 150 of which came with Real Madrid -- as well as the most clean sheets in the history of the competition (57).