Ernesto Valverde's tenure as Barcelona coach is over after he was sacked by the club Monday and replaced by former Real Betis manager Quique Setien in the Camp Nou dugout, the team announced.
Setien was handed a contract that runs through the 2022 season. Barca were keen to offer him the role until the end of the season with the option to extend for an additional 12 months in the summer, but his agent, Edoardo Crnjar, pushed for a longer deal.
Setien, 61, will take over a Barcelona side who sit top of La Liga and are safely through to the Champions League knockout rounds, where they face Italian side Napoli in the last 16.
Valverde's position became untenable over the weekend following Barca's Spanish Supercopa defeat to Atletico Madrid.
The club's open pursuit of former captain Xavi Hernandez, who turned down the chance to return as coach on Sunday, left Valverde's future hanging by a thread.
Barca president Josep Maria Bartomeu met with Valverde at the club's training ground Monday, where he had previously taken part in practice with the players ahead of Sunday's game against Granada.
Bartomeu then traveled to Camp Nou, where he met with other members of the club's hierarchy to ratify Valverde's dismissal and finalise the terms of Setien's appointment.
Al-Sadd boss Xavi, who left Barca for Qatar in 2015, had been the first choice to take over, but, following two days of talks with sporting director Eric Abidal and CEO Oscar Grau in Doha over the weekend, Xavi told them the timing wasn't right. He remains open to returning in the future.
The list of potential replacements who were then linked with the role was extensive. Ronald Koeman, Mauricio Pochettino and Garcia Pimienta were among those mentioned, but it was Setien whom the club decided to turn to in the end.
The Spanish coach has had a low-key career to date, involving spells with Betis, Las Palmas, Lugo and Logrones, but has earned many fans in recent years for his style of football, which Barca feel fits their philosophy.
It will be the first time since 2002-03 that the Blaugrana have taken the drastic decision to change their coach midseason. On that occasion, Louis van Gaal was replaced by Radomir Antic with the side 12th in La Liga.
Valverde, 55, took over from Luis Enrique in the summer of 2017. His first season yielded a league and cup double, but the campaign was tainted by a shock Champions League elimination to Roma, with the Italians overturning a 4-1 first-leg defeat to progress to the semifinal.
The former Athletic Bilbao coach also won the league title in his second season, but the year ended with many people calling for him to be sacked after another Champions League debacle, this time against Liverpool, was followed by a Copa del Rey final defeat to Valencia.
Bartomeu, amid a lack of alternative options, decided to back his coach, though.
However, while Barcelona sit top of La Liga and remain in the Champions League, the side's performances this season have seen more criticism piled on Valverde.
Defeats away at Athletic, Granada and Levante in the league further weakened his position, with the players, who always stood behind their manager in public, beginning to lose confidence in him.
This month's 2-2 draw at bottom club Espanyol set off more alarm bells. And the nature of Thursday's Supercopa defeat against Atletico Madrid in Saudi Arabia -- when Barca actually produced a much-improved performance before falling apart in the last 10 minutes -- proved the final straw as fan discontent grew. Fans loudly jeered Valverde in Jeddah.
Sources told ESPN in the aftermath of that loss that Valverde's job remained safe and players, including Lionel Messi backed him after, but the overwhelming feeling among the club's hierarchy was that it was time for a change eventually forced Bartomeu to act.