The wait is over. is officially the head coach for Barcelona.

will terminate Xavi’s contract as soon as Barcelona pay the €5m release clause required to get their star man back from the Doha side. The former midfielder made 767 appearances for the Blaugrana.

“The Al Sadd administration has agreed on Xavi’s move to Barcelona after the payment of the release clause stipulated in the contract,” Turki Al-Ali tweeted.

“We’ve agreed on cooperation with Barcelona in the future. Xavi is an important part of Al-Sadd’s history and we wish him success.

“Xavi informed us a few days ago of his desire to go to Barcelona at this particular time, because of the critical stage his hometown club is going through, and we understand this and decided not to stand in his way.”

Xavi replaces the sacked Ronaldo Koeman, who led Barcelona to ninth place in La Liga. Interim boss Sergi Barjuan coached the Catalan side to a crucial win at Dynamo Kyiv in the Champions League on Tuesday, putting the club in second place in their group.

Xavi led the club to four Champions League titles as a player during his 17 years at , including two European trebles. The three-time finalist joins fellow legend to the Camp Nou hot seat. At 41, Xavi becomes the second-youngest coach in La Liga behind Rayo’s Andoni Iraola.

The Xavi news follows in the wake of two other coaching announcements this week: Tottenham hired Antonio Conte while Newcastle selected Eddie Howie for its project rebuild.

Photo: Twitter/@MadridBlaugrana