andres iniesta, barcelona
Barcelona's Andres Iniesta celebrates with the Spanish King's Cup trophySusana Vera/Reuters

FC Barcelona captain Andres Iniesta has ended speculation he could leave the club where he has spent his entire career by announcing the agreement of a contract for life with the Liga side on Friday.

"Barcelona and Andres Iniesta have reached an agreement to renew his contract for life which will tie both parties together," Barcelona said in a statement.

Iniesta, 33, has been at Barcelona since he was 12 years old, making his professional debut in 2002. He is the club's second all-time leading appearance maker behind Xavi Hernandez, playing 633 games and scoring 54 goals.

The Spain midfielder's current contract was set to expire in June 2018 and he set alarm bells ringing at the club by declaring in an interview with Spanish newspaper El Pais in August that he could leave when his deal ran out.

He will give a news conference at the club's Nou Camp stadium later on Friday alongside president Josep Maria Bartomeu.