Luis Enrique was replaced by Luis de la Fuente as Spain's coach on Thursday, two days after the national team was eliminated in the round of 16 at the World Cup.
Spain lost to Morocco 3-0 in a penalty shootout after a scoreless draw in regular and extra time.
The Spanish soccer federation thanked Luis Enrique, but said it was time to "start a new project" to keep the growth achieved by the coach in recent years. It said the change was made after a recommendation by its sporting officials.
The 61-year-old De la Fuente, a former left-back with Sevilla and Athletic Bilbao, helped Spain's under-19 squad win the European Championship in 2015, and the under-21 team win Euro 2019. He also coached Spain's squad, which won a silver medal at the Tokyo Olympic Games.
De la Fuente had coached the senior national team once, when youth players were used in a friendly against Lithuania because the main squad had to go into isolation due to coronavirus.
Other candidates who had been considered besides De la Fuente, who was Spain's under-21 coach, included former Belgium manager Roberto Martnez and former Athletic Bilbao coach Marcelino Garca Toral.
Spain got off to a good start in Qatar, routing Costa Rica 7-0, but La Roja couldn't win again in its last three matches. It drew 1-1 with Germany and lost 2-1 to Japan before being held by Morocco.
Luis Enrique took over the national team in 2018 to start revamping the squad after its elimination in the round of 16 of the World Cup in Russia. He temporarily left because of the illness and eventual death of his young daughter but returned in 2019.
He helped Spain reach the last four of the Nations League twice, including this season and last year when it lost the final to France.
He also led Spain to the semi-finals of the European Championship last year, losing to Italy in a penalty shootout.
Luis Enrique's contract ended after the World Cup. The former Barcelona player and coach had said moments after the loss to Morocco that he would take some time to rest before starting talks with the federation about his future. He said he would have liked to stay with the national team "forever," but knew that it might not be possible.
The 52-year-old Luis Enrique, not long ago seen as one of the most uptight coaches in soccer, had opened up at the World Cup, doing streaming sessions, going on bicycle rides and talking frankly about controversial issues.
The team's elimination in Qatar raised more questions about whether Spain should start overhauling its soccer philosophy and get rid of the "tiki-taka" ball-possession style that has not produced results recently. Luis Enrique had said he wasn't planning to relinquish the "tiki-taka" if he remained as a coach, and De la Fuente also is likely to keep it alive.
De la Fuente is expected to make his debut with the senior team when Spain resumes playing in qualifying for Euro 2024 in March next year.