Pep Guardiola, Xavi Hernandez congratulate Rafa Marquez on 'spectacular career'

Former Barcelona manager Pep Guardiola and midfielder Xavi Hernandez have lauded Mexican defender Rafa Marquez's career, after the 39-year-old confirmed his retirement in a thank-you letter on Saturday.

Marquez featured for Mexico at the World Cup, but had already retired for club side Atlas and made it known that Russia 2018 would be the end of his career.

Marquez wrote that he felt "very satisfied" with his 22-year career and highlighted that the happy times outweigh the more negative episodes.

"I don't regret anything because the success and more so the errors taught me to be better each day, to not be afraid of making mistakes and to have the habit of always giving my best," the former Barcelona player wrote on Twitter.

Figures from the world of football congratulated Marquez on a career that will go down as one of the most successful ever for a Mexican player, with the Michoacan native capping it off by becoming only the third player in history to feature in five World Cups.

"One of the most talented and competitive center-backs in the last two decades and in the history of Barcelona," read a tweet on Guardiola's Twitter.

Midfielder Xavi shared a dressing room with Marquez over seven seasons at Barcelona and also had a message for the former Monaco player.

"You left an enormous example and imprint on Barcelona," Xavi said. "Congratulations on your spectacular career."

Marquez won two Champions League titles, four La Liga crowns and one Club World Cup at Barcelona and is expected to be named sporting president at his first club Atlas in coming days.

Marquez final appearance came in Mexico's 2-0 loss to Brazil at the Round of 16 stage of the World Cup, but he came close to not making Russia 2018 after his career was thrown in turmoil when his name appeared on a U.S. Treasury Department blacklist last August for alleged links to a drug trafficking organization.

The former defender temporarily put his career on hold to fight the charges and was unable to wear sponsorship on his training gear with the national team because of his situation.