Brazil was destined to win the 2006 World Cup.
With Ronaldinho and Kaka at the height of their powers, the Selecao headed to Germany brimming with confidence. They slaughtered Argentina 4-1 in the FIFA Confederations Cup final in Frankfurt the year before and were being touted as the odds-on-favourite to win this tournament before a ball was even kicked.
But it all went horribly wrong for the Brazilians, who stumbled through the first round of the competition before meekly crashing out in the quarter-finals.
Many theories were put forward for why things turned sour for the five-time World Cup winners. But everyone agreed on one thing: Brazil's national team was in crisis and needed a major overhaul.
A key player in Brazil's 1994 World Cup-winning side, Dunga was installed as the new national team coach, replacing the legendary Carlos Alberto Parreira, and the hard work began.
The transformation has been startling.
From under-achievers to winners
Dunga's Brazil went on to win the 2007 Copa America, erased a two-goal deficit to beat the United States in the 2009 Confederations Cup final and finished first in the South American qualifiers for next year's World Cup, clinching a tournament berth with an emphatic 3-1 road victory over arch-nemesis Argentina.
What's been the key to Dunga's success in turning Brazil from under-achievers into world-beaters?
"He's brought seriousness to the team," Tim Vickery, a Rio-based reporter and expert on South American soccer, told CBCSports.ca.
"He took over after the failure of 2006, when they all believed they were going to win and they never looked like winning. They were never a convincing side. The conclusion that was drawn from that was the stars [have] gone out of control."
Indeed, much like Fabio Capello did with England, Dunga did not feed the egos of his star players. Instead, he systematically dismantled the Hollywood star culture that enveloped the Brazilian locker room. And he preached team unity.
"Dunga took over a team full of stars, and one of the changes he made straight away was he had them stop rooming individually," Vickery explained. "He had them room together in an attempt to form a team spirit. And if you look at the team now, the ringleaders on the team aren't the bohemians any more, like Romario was in the past.
"The two senior players are Lucio and Kaka, who are religious fundamentalists, and that's spreading a message of rigour and sobriety, so that's something that Dunga has done — he's changed the tone of the team. He's manoeuvred it away from being such a star-based vehicle and emphasized the collectivity of the team and collective sacrifice."
Stars must earn spot on roster
Dunga also took a hard line with players who failed to live up to their star billing.
Ronaldo and Ronaldinho served as the backbone and the centrepiece of the Brazilian team for years, long before Dunga took over as coach. But neither suited up for the Selecao at the 2009 FIFA Confederations Cup, because both veterans were omitted from the 23-man roster. Neither will be going to this year's World Cup.
The message was clear: If you wanted a place on his team, you had to earn it.
It was "a kick up the backside of Ronaldinho," Vickery said of Dunga's decision to leave the AC Milan star at home. "The message [was], 'Get yourself fit, get out of this state of denial you're in, where nothing's wrong. If you do that, you'll be in our plans. If not, you're not going to the World Cup next year.'"
Another significant change has come on the actual field. Under Parreira, players were given a fair bit of freedom and free reign to follow their creative instincts. Far from stifling Brazil's creative edge, Dunga has preached a more disciplined style of play, with particular focus on the counter-attack and set pieces.
"He's implanted a very clear tactical model, where the players take the field knowing exactly what their function is," Vickery said. "There's a team ethos and a sense of clarity that he has instituted."