Spain's World Cup-winning goalkeeper Iker Casillas announced his retirement on Tuesday, after being sidelined for more than a year with a heart problem.
Casillas, 39, also won the European Championship twice with his country in a trophy-laden career which included more than 700 games for Real Madrid.
"Today is both one of the most important and most difficult days of my sporting life, the time to say goodbye has arrived," he said on Twitter.
Casillas joined Portuguese side Porto in 2015 after a tearful departure from Madrid. He suffered a heart attack in May last year.
He played 167 times for Spain, winning the 2010 World Cup and the Euros in 2008 and 2012 in a golden age for Spanish football.
He lifted five La Liga titles and the Champions League on three occasions during his time at the Santiago Bernabeu.
"The best goalkeeper in the history of Real Madrid and Spanish football joined us at the age of 9. He was formed here and defended our shirt for 25 years, becoming one of our most emblematic captains of all time," the club said in a statement.
"Today one of the most important footballers in our 118 years of history calls it a day as a professional player, a player we love and admire, a goalkeeper who has made the Real Madrid legacy bigger with his work and exemplary behaviour both on and off the pitch," they added.
Former club and country team-mate Sergio Ramos was among many players to praise the veteran, nicknamed 'The Saint', on social media.
"Football thanks you, man. Forever a legend @IkerCasillas," Ramos tweeted.
Ex-Spain and Barcelona midfielder Andres Iniesta followed suit.
"All the best for you and your family in this new stage that will be presented in your life", he tweeted.
Madrid's current goalkeeper Thibaut Courtois also showed his appreciation for Casillas.
"Idol, companion, rival, reference... you are exemplary in many facets, but the main one in being a great person!! Congratulations on the road @IkerCasillas and thank you for everything!!" he posted on Twitter.
Vicente del Bosque, who coached Casillas at Madrid and with Spain also hailed his efforts.
"Casillas has been a hero of the national team and Spanish football," he said.
Madrid president Florentino Perez said Casillas had left a lasting impression at the club.
"Iker Casillas says goodbye as a professional player, having contributed to further enhance the myth and legend of Real Madrid," Perez told the club's website.
"His legacy will always be here. Iker knows that this is and will always be his home",
Former Italy captain Gianluigi Buffon, who played against Casillas on numerous occasions and is also seen as one of his country's finest ever goalkeepers, echoed Ramos and Del Bosque's praise.
"They say competition makes us better than others but not perfect faced with ourselves. Maybe this futile pursuit of perfection is what made us who we are. #Grac1as Iker, without you, everything would have been less meaningful," Buffon tweeted.
In June, Casillas said he was ending his bid to run for the presidency of the Spanish Football Federation, because of the coronavirus pandemic.