Former Real Madrid and Spain goalkeeper Iker Casillas has retired from football at the age of 39.
Casillas made 725 appearances for Real during a 16-year career at the Bernabeu, winning three Champions League titles and five La Liga crowns.
He also helped Spain win the 2010 World Cup and two successive European Championships in 2008 and 2012.
Casillas joined Porto in 2015 but has not played since suffering a heart attack during training in April 2019.
During his recovery he was given a role on the club's coaching staff in July 2019.
He made 156 appearances for the Portuguese side, winning two Primeira Liga titles and one Portuguese Cup.
Casillas won 167 international caps for Spain between 2000 and 2016. Only Sergio Ramos has made more appearances for the national side.
Real Madrid defender Ramos posted a photo of himself with Casillas on Twitter as a tribute to his former team-mate.
Announcing his retirement on Twitter, Casillas said: "The important thing is the path you travel and the people who accompany you, not the destination to which it takes you.
"I think I can say, without hesitation, that it has been the path and the dream destination."
Real Madrid said Casillas, who joined the Spanish giants at the age of nine, was the best goalkeeper in the 118-year history of the club.
"Real Madrid wants to show its appreciation, admiration and love for one of the greatest legends of our club and world football," read a statement on the club's website.
"Iker Casillas belongs to the heart of Real Madrid and will be so forever."
In February, he announced his intention to run for the presidency of the Spanish Football Federation (RFEF), before later withdrawing because of the "exceptional social, economic and health situation" the country was suffering during the Covid-19 pandemic.