Doha: Spain sacked coach Luis Enrique on Thursday after the 2010 champions were dumped out of the World Cup by Morocco at the last-16 stage, quickly naming his replacement as under-21s boss Luis de la Fuente.
Spain started their campaign in Qatar in style by hammering Costa Rica 7-0 and qualified for the knockout phase despite a shock 2-1 defeat to Japan.
They were strong favourites for their last-16 match against Morocco but crashed out on penalties after the game finished goalless following extra-time.
"Both the president, Luis Rubiales, and the sporting director, Jose Francisco Molina, have told the coach their decision," the RFEF (football association) said in a statement.
They said they wanted to thank Luis Enrique and his staff for their work, but had decided to start a "new project".
Shortly afterwards, the federation announced that De la Fuentes, who led Spain's men's team to the silver medal at last year's Olympics, was the new man in the hotseat.
Luis Enrique had said he wanted to stay on as coach after the defeat to Morocco on Tuesday.
"I am very happy with the Spanish FA, the president and with (the sporting director)," he said.
"If it was up to me I would stay all my life, but that is not the case. I have to think calmly what is the best for me and for the national team."
Spain last lifted a major trophy a decade ago at Euro 2012, while they have not won a single knockout game at the Word Cup since triumphing in South Africa in 2010.
Luis Enrique took over in 2018 after Spain's disappointing showing at the World Cup in Russia, and led La Roja to the semi-finals of Euro 2020, where they were also beaten on penalties, by Italy.
His time as Spain coach was characterised by a firm commitment to maintaining possession.
They attempted more than 1,000 passes against Morocco but ended up with nothing to show for it, forcing Yassine Bounou into only one save before the shootout.
"We dominated the game but we lacked a goal," lamented Luis Enrique. "We could have been more effective in the final third, but I am more than satisfied with what my players did.