MADRID: Xavi Hernandez has been given the all-clear to take over Barcelona after his Qatari club Al Sadd agreed a compensation deal.

The Gulf state’s champions had previously said their 41-year-old boss would not be allowed to leave.

Xavi, who played 779 games and won 25 titles with Barca, had said publicly¬†he hoped “to go home” as Barca boss¬†and that an agreement could be reached.

Al Sadd say Barca have paid the release clause in Xavi’s contract.

The World Cup and two-time European Championship-winning former Spain international left Barcelona for Al Sadd in 2015, first joining the club as a player.

He took over as head coach after retiring in 2019 and led them to last season’s league title. They are unbeaten in 36 league games.

The Qatari club tweeted that Xavi “is an important part of Al Sadd’s history” and wished him success in the future.

“The administration has agreed on Xavi’s move to Barcelona after the payment of the release clause stipulated in the contract,” the club posted on Twitter. “We’ve agreed on cooperation with Barcelona in the future.”