Brazil left it late before securing a place in the FIFA Confederations Cup final with a 1-0 victory over South Africa.
Dani Alves' spectacular 88th minute strike, after much toiling by the South American giants, put paid to the hosts' dreams and ensured Dunga's side march on to Sunday's final against the United States.
Brazil struggled to find their stride early on and were restricted to ambitious efforts from distance which rarely troubled the target.
With the Brazilians struggling, the first notable opportunity of the game fell to the hosts as Aaron Mokoena nodded a free header over the bar when picked out in space six yards out.
South Africa continued to look dangerous throughout the first half, with Siphiwe Tshabalala stinging Julio Cesar's fingertips with a well struck free-kick and Steven Pienaar brushing the outside of the post with a dipping effort as the interval approached.
Real Madrid's big-money signing Ricardo Kaka was kept relatively quiet by a stubborn African defence, but he showed on a couple of occasions that he only needs a yard in which to cause a menace.
Unfortunately for him Brazil's failings continued after the break, with few chances created by a side that had been in such splendid form heading into the game.
Robinho and Luis Fabiano both saw tame efforts fail to trouble Itumeleng Khune, while their own keeper was forced into a smart save to keep pout a deflected effort from Tshlolofelo Modise.
Half-chances came and went for both sides as the game trudged on, but goalkeepers were virtually made redundant.
Then, with extra-time looming, one moment of magic from substitute Dani Alves saw Brazil snatch victory as he lashed home an unstoppable 20-yard free-kick.
Luis Fabiano should have wrapped things up in the last minute, but he saw a scuffed shot kicked away by Khune.
Brazil now go on to face USA in Johannesburg on Sunday night, while South Africa play Spain in the Third-place final in Rustenburg on Saturday.
[FIFA Confederations Cup 2009]
Source: Sky Sports