Iker Casillas is likely to confirm his retirement from football after a 21-year career. Dean Mouhtaropoulos/Getty Images

Former Real Madrid and Spain goalkeeper Iker Casillas has announced his intention to run for the role of president of the Spanish FA, a move that is set to lead to him retiring from professional football as a player.

Casillas, who captained Spain to World Cup glory in 2010 as was well as European Championship success in 2008 and 2012, has not played since he suffered a heart attack during training with Porto in May 2019, but is still registered as a player on the club's books.

- ESPN La Liga fantasy: Sign up now!

- When does the transfer window re-open?

"Yes, I will run for the presidency of the [RFEF] when the elections are called," he said on Twitter. "Together we will put our federation at the top of the best football in the world.

"I have informed my club, FC Porto, to whom I can only express my deepest gratitude, of my decision."

Although Casillas has not directly stated he'll hang up his gloves and boots, Porto president Pinto Da Costa said on Tuesday the player has informed him as much.

"Before announcing his candidacy, [Casillas] came to Porto to have lunch with me to announce his decision that he would end his career," Da Costa said.

Sources had told ESPN earlier in February about Casillas' intention to run for president of the Spanish FA and the 38-year-old has now confirmed he will challenge Luis Rubiales for the role.

The RFEF presidential elections are expected to take place after the Olympics in Japan. However, Rubiales requested early elections before March 31.

The Adminstrative Sports Court (TAD) turned down the RFEF's request to have early elections because of a "lack of clarity and non-compliance of the basic legal precepts."

But the Spanish Sports Council (CSD), which can authorise the change of date, is now reviewing the RFEF's case on appeal.

Rubiales and La Liga president Javier Tebas have endured a difficult relationship which has culminated in various public disagreement and, according to ESPN sources, one of Casillas' principle aims would be to restore peace between the two organisations.

Casillas spent spent 16 years as a player with Real Madrid from 1999 to 2015, where he won the Champions League on four occasions as well as five La Liga titles. He is second behind Raul on the club's all-time appearance list.

He then moved to Porto, where he won the league title in 2018.