Barcelona and Javier Mascherano have agreed a contract extension that will keep the former Argentina captain at the club until 2016.

Barcelona says the deal will be signed in the coming weeks, with the buy-out clause to be set at ?100 million ($123 million).

The 28-year-old former Liverpool and Corinthians player joined the Spanish league club in 2010. After a rocky start, when he had trouble adapting to the Catalans' style of play, Mascherano settled in to become a regular in both midfield and defense. He filled in at centerback for most of last season due to injuries.

Lionel Messi says Mascherano ''has become a fundamental player for us. Since (former coach Pep) Guardiola turned him into a centerback he hasn't had one poor game.''