The Brazil football manager Luiz Felipe Scolari has officially resigned after the hosts suffered two of their worst defeats in World Cup history.
Scolari's men were favourites to win the tournament but were demolished 7-1 in the semi-finals by eventual champions Germany.
To compound their misery, they lost the third-place playoff 3-0 against the Netherlands.
The Brazilian football president Jose Maria Marin confirmed Scolari's much expected departure in a statement and thanked the experienced coach for helping "rescue the Brazil team's self-esteem."
Scolari, who led Brazil to the last of their record five World Cups in 2002, took over the post for a second time in November 2012 and lost just five of his 29 games in charge.
He led Brazil to the Confederations Cup last year with a memorable 3-0 defeat of then world champions Spain in the final.
He was hugely popular in Brazil for his gruff charm and also with the players, who looked up to him as a father figure.
He had the support of the nation going into the World Cup and there was very little opposition to his squad selection, a rarity in Brazil, which is famously known as the "nation of 200 million coaches."
Marin did not say who might take over but says a press conference will be held on Friday.
One Brazilian sports channel reported Alexandre Gallo, the coach of the Brazil under-20 side, would take over until the end of the year.
Among the other names mentioned are Tite, who led Corinthians to the Libertadores Cup and Club World Cup in 2012, and Muricy Ramalho, the current coach of Sao Paulo.