Ronald Koeman has been sacked as head coach of Barcelona after 14 months in charge at the Nou Camp.
Barca have picked up just 15 points from 10 games in La Liga and have already lost twice in the group stage of this season's Champions League.
The loss was Barca's third in their last four games and it followed defeat in Sunday's Clasico to Real Madrid.
In a statement, the Spanish club said: "The president of the club, Joan Laporta, informed him [Koeman] of the decision after the defeat against Rayo Vallecano.
"Ronald Koeman will say goodbye to the squad on Thursday."
The former Netherlands, Everton and Southampton boss, 58, could only guide the five-time European champions to third place in the league last season.
The Dutchman has not been helped by the club's significant financial problems, which resulted in Lionel Messi's exit and subsequent move to Paris St-Germain in August.
Speaking after Wednesday's defeat, Koeman said: "It [Barcelona's league position] says we're not well.
"The team has lost balance in the squad, lost very effective players, which shows. In recent years other clubs have strengthened every season and we haven't, which also shows."
Club legend Xavi, the former Barca midfielder who is now manager of Qatari side Al Sadd, is one of the favourites to replace Koeman.
It is the first time since September 1987 that Barca have lost three away games in a row without scoring - a run that saw English manager Terry Venables sacked.
Koeman won the Copa del Rey at the end of his first season but Barca finished behind Atletico Madrid and Real Madrid in La Liga with their lowest points tally since 2008.
The former Netherlands centre-back played for the Spanish club between 1989 and 1995, helping them to four league titles and scoring the winning goal in the 1992 European Cup final.
He was brought back to the club in August 2020 as head coach by former president Josep Maria Bartomeu.
New chief Laporta, however, frequently made it clear the Dutchman was not his appointment.
The duo had an uneasy relationship, and Koeman released a statement in September asking to be given time to rebuild after losing Messi and fellow forward Antoine Griezmann in the summer.
Following the defeat to Madrid on Sunday, Koeman's car was surrounded by some Barcelona supporters, whom he later dismissed as "uneducated people".
Speaking before the trip to Rayo Vallecano, he said: "It is a social problem. Uneducated people that don't understand rules and values."
What's gone wrong at Barcelona?
One of Koeman's first tasks as coach was to make a 40-second phone call to Luis Suarez during which he told the Uruguay striker his services were no longer required and that he was free to leave the club.
The decision had been made by the board and it's now known the dire financial position forced them to get rid of a forward who scored 21 goals from 29 starts in the previous campaign.
It began a weakening of the Barca squad from one that could compete with Europe's elite to one that is struggling to get into the Champions League places.
Messi then handed in a transfer request but ended up staying for 2020-21 but Suarez joined Atletico Madrid for a nominal fee and fired them to the league title.
Behind the scenes the club's costs had spiralled to an unsustainable level, creating the biggest wage bill in world football and leaving Barcelona on the verge of bankruptcy and a stadium that requires renovation.
With Messi out of contract, the Argentina superstar agreed a new deal in July of this year until 2026 that included halving his wages, but La Liga stipulated Barca must reduce their wage bill further before he and any new players could be registered.
They weren't able to do that, so in August the club announced that Messi would be leaving "because of financial and structural obstacles".
He joined Paris St-Germain then Koeman lost more talent when France forward Griezmann followed Suarez to Atletico Madrid - re-joining the club he had left in a £107m deal two years before on a loan in a snapshot of where it has gone wrong for Barcelona.
They managed to sign former Manchester United forward Depay and Aguero on free transfers but the former Manchester City striker has only just made his Barca debut after getting injured in pre season.
The transformation from a forward line of Messi, Suarez and Griezmann to Depay, De Jong and an ageing Aguero sums up the task Koeman faced and which will now greet his successor.