Luis Enrique has left his position as head coach of Spain following his side's surprise World Cup last-16 defeat to Morocco, the Royal Football Federation (RFEF) has confirmed.
Spain were eliminated on penalties after Tuesday's contest at Education City Stadium finished goalless after extra-time.
Former Barcelona boss Luis Enrique's contract was due to expire at the end of the tournament in Qatar, and it was confirmed on Thursday he will not be staying on.
"The RFEF would like to thank Luis Enrique and his entire coaching staff at the helm of the absolute national team in recent years," the statement read.
"The sports management of the RFEF has transferred to the president a report in which it is determined that a new project should start for the Spanish soccer team.
"The aim is to continue with the growth achieved in recent years thanks to the work carried out by Luis Enrique and their collaborators.
"Both the president, Luis Rubiales, and the sports director, Jose Francisco Molina, have transmitted the decision to the coach.
"The RFEF energetically wishes Luis Enrique and his team the best of luck in their future professional projects.
"The coach earns the love and admiration of his collaborators in the national team and of the entire Federation, which will always be his home."
Luis Enrique had been in charge of Spain since 2018, bar a four-month period in 2019 when stepping aside due to the illness and subsequent death of his young daughter.
He led La Roja to the semi-finals of Euro 2020 last year, where they lost on penalties to Italy, and to the 2020-21 Nations League final, where they were beaten by France.
Spain's loss to Morocco was their third straight tournament exit on penalties, having also suffered defeat by that method against hosts Russia in the 2018 World Cup last 16.
Luis Enrique's side started their Qatar 2022 campaign in style with a thumping 7-0 win over Costa Rica, which they followed up with a creditable 1-1 draw against Germany.
However, a 2-1 loss to Japan saw them finish second in Group E and they were unable to overcome a Morocco side 15 places below them in the latest FIFA rankings.
Spain's failure to score a single penalty in Tuesday's shoot-out made them just the second team to do so in World Cup history, after Switzerland against Ukraine in 2006.
Asked about his future after that match, in which Spain recorded just one shot on target despite registering 1,019 passes, Luis Enrique said: "I can't tell you.
"Your colleagues already asked me and I don't know because I don't know this decision.
"Now is not the time for me to talk about my future. My contract is going to end, but I'm happy with the national team, with the federation, the president.
"I could always carry on but I need to think and have peace of mind about what's the best for me and my national team."
Spain's next match is against Norway on March 25 in their opening Euro 2024 qualifier.