Portugal defender Pepe announced on Thursday he was hanging up his boots at the age of 41.
The last game of the Brazilian-born center back's career was for Portugal in its penalty-shootout loss to France in the European Championship quarterfinals last month. He was in tears after the game.
He became the oldest player to appear at a European Championship finals tournament.
Pepe announced his retirement on social media.
"I want to thank God for giving me the wisdom to be able to continue my journey," an emotional Pepe said in a video on social media that looked back on his career.
"I can't help but also thank all the presidents who bet and believed in me to be able to perform my work. To all the employees of all the clubs I've been to, who are the soul and essence of the clubs and the national team.
"And I want to thank everyone in the background. I want to leave a thank you and a hug of gratitude for all of you. And thank you all very much."
Although born in Brazil, the center-back made his international debut for his adopted country of Portugal in 2007 and went on to help them win their first piece of major silverware at Euro 2016, as well as the Nations League three years later.
Pepe made 141 appearances for Portugal, only behind Cristiano Ronaldo (211) and Joao Moutinho (146).
He joined Portuguese side Maritimo at the age of 18 and went on to play for Porto, Spanish giants Real Madrid and Turkish club Beşiktaş.
In his club career, he won three Champions League titles and three Spanish league titles with Real Madrid between 2007-17. He also won two FIFA Club World Cups.
His last club was Porto, where he enjoyed two stints, between 2004-2007 and 2019-2024, winning a total of four Portuguese championships and five Portuguese Cups.
"A career and a legacy that will always be an example for any Porto fan," the Portuguese club said on social media platform X.
"There are only two possible words: Congratulations and thank you."
The veteran played 878 matches in all and won an impressive 34 trophies.
Portuguese football federation president Fernando Gomes labeled the defender "one of the greatest players of all time" and thanked him for his "extraordinary professionalism, dedication... and passion for football."