Xavi has returned to Barcelona as their new permanent head coach following the sacking of Ronald Koeman.
Koeman's 14-month reign came to an end following Barca's 1-0 defeat to Rayo Vallecano on October 27, with the Dutch boss failing to convince.
Barca have now turned to another club legend in an effort to steady their ship, with World Cup winner Xavi leaving Qatar-based club Al Sadd and joining Barca on a deal through the 2023-24 season.
What's been said?
"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," a Barcelona statement said.
"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.
"It is expected that Xavi Hernandez will arrive in Barcelona this weekend and that on Monday 8 November his presentation as new FC Barcelona first team coach will take place in an event open to the public at Camp Nou.
"After the event Xavi Hernandez will appear in a press conference in the Ricard Maxenchs press room."
Al Sadd said in a club statement: "Club administration have approved the transfer of Xavi to Barcelona after the payment of the clause stipulated in his contract. Xavi is considered an important part of our history and we wish him every success in the future."
Xavi is one of the most decorated players in Barca's history, having won 25 trophies at Camp Nou between 1997 and 2015 including eight Liga titles and the Champions League.
The Spaniard made 767 appearances for the club, a record bettered only by Lionel Messi, and also contributed 85 goals and 185 assists.
Xavi left Barca for Al Sadd in 2015 and retired four years later before becoming the Qatari club's permanent manager, and delivered the league title in his second season at the helm.
Al Sadd won five more trophies under the 41-year-old, who has now decided the time is right to head back to Camp Nou having rejected previous offers from Barca due to a lack of coaching experience. He had made it clear to reporters he wanted to head home when fresh rumours surfaced.
He said: "I really want to go home. I hope it happens. I have a contract and now the clubs have to negotiate. They already know my position."
Xavi has got his wish, after Barca officials flew to Qatar to thrash out a deal with Al Sadd and their top coaching target before an agreement was finalised.
How big is the task facing Xavi?
Xavi will be a popular appointment among the Blaugrana faithful, but it will take a monumental effort for him to turn the team's fortunes around following their poor start to the 2021-22 campaign.
Barca have already lost three Liga games including a painful Clasico defeat at home to Real Madrid, with Koeman having ultimately failed to find the right balance in the squad after Messi, Antoine Griezmann and a number of other key players departed in the summer.
New signings Memphis Depay and Eric Garcia have yet to reach their best levels while Sergio Aguero is ruled out long term with health problems, and the Catalan club sit ninth in La Liga while also finding themselves in danger of being dumped out of the Champions League at the group stage.
Xavi will hope to hit the ground running, with Barca travelling to Celta Vigo on Saturday before entering another international break that will give the new boss time to find his feet in familiar surroundings.