Barcelona's all-time appearance holder will play his final league game for the club at the weekend.

Barcelona midfielder Xavi Hernández will reveal on Thursday he is leaving the club to sign a three-year deal with the Qatari side Al Sadd.

Xavi, Barça’s record appearance record holder and the club captain, is set to follow in the footsteps of his former Spain team-mate Raúl, who played for Al Sadd between 2012-14.

Xavi, 35, will also work with Qatar’s Aspire Academy, become an ambassador for the 2022 World Cup to be held in the Gulf state, and intends to start his coaching qualifications, his agent, Ivan Corretja, told Reuters.

The move comes a year after he was initially tipped to move away from Barcelona. The midfielder was linked with moves to MLS outfit New York City and Qatar’s Al Arabi, but was persuaded to stay at Camp Nou under newly-appointed coach Luis Enrique.

There has been speculation about the amount Xavi will be earning in Qatar, but Corretja declined to comment on reports that Xavi will earn €10m (£7.2m) a season.

Xavi has been with Barcelona since he was 11-years-old, but after being a regular for 16 years, has spent much of this season on the bench.

He won 133 caps, a record for an outfield player with Spain, and was a key figure in the team’s run 2010 World Cup and the 2008 and 2012 European Championships triumphs.

With Barça, Xavi has won three Champions Leagues, eight La Liga titles and a host of other trophies.

He could still win another two trophies, with Barça through to the Champions League final to play Juventus on 6 June, a week after they play Athletic Bilbao in the Copa del Rey final.