Xavi has signed a new long-term contract at Barcelona which will see him remain at Camp Nou until 2016.
The talented midfielder's current deal was due to expire in 2014, but he has now put pen to paper on an extension which is likely to see him end his career with the Catalan giants.
The 30-year-old briefly broke away from preparing for the World Cup with Spain to return to Barcelona to sign the agreement with president Joan Laporta.
Xavi and his team-mates will now fly out to South Africa where they are favourites to lift the trophy following their success in Euro 2008.
"FC Barcelona and Xavi Hernandez, who were due to finish their contractual relationship on June 30, 2014, will add two clauses onto the contract this Wednesday which could keep the player at the club until 2016, depending on the amount of games played," Barca said in a statement on their official website.
Barca revealed that the new deal would allow Xavi "to retire at FC Barcelona, providing he remains an important player to the team".
In order to trigger the new clause, Xavi must play at least 50 per cent of Barca's matches in the last two seasons of his remaining deal. The midfielder's release clause of 80million euros will remain the same.
By the end of the extra two years, Xavi, who joined Barca at the age of 11, will be 36 and will have spent his whole career at the Catalan club.