Barcelona have appointed Xavi as their new manager on a two-and-a-half-year deal.
The former midfielder, who spent 17 years in the Barcelona first team between 1998 and 2015, joins from Qatari outfit Al Sadd after the two clubs had agreed on the payment of a release clause in his contract.
"FC Barcelona have reached an agreement with Xavi Hernandez for him to become first-team coach for the rest of the current season and two more seasons," the Catalan club said on its official website.
"Xavi Hernandez, a youth-team product at Barca, has left his current club, Al Sadd of Qatar, after talks held over the last few days with the owners of the club."
The 41-year-old, who progressed through Barcelona's La Masia academy, will be unveiled at a press conference on Monday.
Xavi, a World Cup and double European Championship winner with Spain, is one of the most decorated players in Barcelona’s history.
He won 25 major trophies at the Nou Camp, including eight La Liga titles and four Champions Leagues.
Xavi made 767 appearances for Barcelona, a club record until the mark was beaten by Lionel Messi.