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 to win 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 Fuente, who led Spain's men's team to the silver medal at last year's Olympics, was the new man in the hot seat.
Luis Enrique expressed his gratitude to the RFEF for the opportunity he had been given in a farewell message on Instagram.
"What the national team needs is support, in all senses, so that Luis de la Fuente can achieve what he wants," he wrote, also thanking the players, staff and fans.
"(To) the players, who have been exemplary in their behaviour and faithful to the idea put before them, I am sorry not to have been able to help you more."
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.
The RFEF announced De la Fuente as Luis Enrique's replacement and his appointment will be ratified next week by the federation's board of directors.
"The new coach will make his debut in March for Euro 2024 qualifiers, taking charge of his first games against Norway and Scotland," the RFEF said in a statement.
De la Fuente will be officially presented on Monday as the new coach.
The 61-year-old likes his teams to keep hold of the ball but is more flexible than Luis Enrique and willing to try other strategies when necessary.
Many of the young players in the Spain World Cup squad previously played for De la Fuente at youth level.