La Roja were stunned by the African nation in the last-16, going out on penalties following a 0-0 draw after extra-time.
Advertisement
And the bitter disappointment has cost Luis Enrique his job.
The RFEF has announced the decision to relieve the Barcelona and Real Madrid legend of his duties after four years at the helm.
A statement read: "The Asturian coach managed to give new impetus to the national team since his arrival, in 2018, through a profound renewal that has consolidated a generational change in the team and in Spanish football.
Advertisement
"Luis Enrique qualified for two Final Four of the UEFA Nations League, of the three he played as coach; and he reached the semi-finals of Euro 2020 with his own stamp and through a defined style. He opted for young talent and has sown hope for the future of the Spanish team.
"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."
According to Spanish outlet AS, the nation's Under-21 coach Luis de la Fuente is the frontrunner to take over at senior level.
Advertisement
Advertisement
Ex-Belgium manager Roberto Martinez has also been mentioned as a candidate, along with former Athletic Club boss Marcelino.
Speaking after losing 3-0 to Morocco on penalties, Luis Enrique took full responsibility for his nation's failure.
"The responsibility is mine," he said after the match.
"I chose the first three penalty takers, who were those I thought were the best specialists on the pitch.
Advertisement
"We didn't even get to the fourth. Bounou is a spectacular goalkeeper in this aspect; he has a high percentage in going the right way. He was great."