Extra time appeared an inevitability in Belo Horizonte, with Edinson Cavani having cancelled out Fred's opener, but the Selecao No.18 would have the final sayPaulinho popped up with a late winner as Brazil progressed to the Confederations Cup final with a hard-earned 2-1 victory over a gritty Uruguay side on Wednesday night.
An underwhelming game, which had featured a first-half penalty miss from Diego Forlan, appeared to be heading for extra time, with Edinson Cavani cancelling out Fred's opener for the hosts.
However, Paulinho nodded home a Neymar corner with just four minutes of normal time remaining to send the Belo Horizonte crowd into ecstasy, and leave Uruguay heartbroken.
Brazil looked weighed down by the almost tangible sense of expectancy among a partisan crowd packed into the Estadio Mineirao.
However, even the significant pressure the hosts were under could not explain precisely why Selecao centre-half David Luiz took leave of his senses and elected to haul Diego Lugano to the floor as the pair jostled for position at a corner 14 minutes in.
Luiz's stupidity really should have resulted in Uruguay taking the lead, but Forlan squandered the opportunity to score against the country in which he plies his trade, the Internacional attacker seeing his low spot kick turned around the post by Julio Cesar.
That fine stop drew a thunderous roar from the crowd but, in truth, they were given little else to cheer about during a desperately fractious opening quarter in Belo Horizonte.
Hulk worked himself into a fantastic position just before the half-hour mark, after a neat one-two with Neymar, but the Zenit forward ballooned his effort over the bar.
Brazil's mounting frustration then threatened to get the better of them, with Luiz Gustavo picking up a deserved booking for following through on Cristian Rodriguez, but they made a crucial breakthrough just before the interval.
Paulinho picked out Neymar's clever run in behind the Uruguay defence with a measured chip into the area and the Brazil No.10 controlled the ball on his chest before flicking it goalwards. Fernando Muslera saved well with his outstretched left arm but Fred was on hand to slice home the rebound with the aid of his shin. It was a fittingly scrappy opener, given what had gone before.
Uruguay replied in somewhat similar circumstances just three minutes into the second half, with Thiago Silva - of all players - inexplicably passing the ball straight to Cavani, after a game of pinball in the Brazilian box. The in-demand Napoli striker took a quick touch before beating Julio Cesar with a low strike into the far left corner.
Uruguay very nearly went ahead midway through the second period through a Luis Suarez header that was deflected just over, before Fred flashed a spectacular - but wayward - volley that never looked likely to trouble Muslera.
With both sides horribly devoid of ideas, extra time appeared inevitable, but man of the match Paulinho rose at the back post to meet Neymar's deep corner and beat Muslera with a fine downward header to put the hosts into Sunday's tournament decider.