Defending champions Brazil teetered on the brink of defeat before beating Uruguay on penalties after a bad-tempered 2-2 draw in their Copa America semi-final on Tuesday.
Pablo Garcia, needing to convert Uruguay's sixth kick in the shootout to send them through, instead crashed his effort against the post.
Brazil, who twice surrendered the lead during the match, took advantage as they won 5-4 to earn a place in the final against Argentina or Mexico, who met yesterday in Puerto Ordaz.
Gilberto converted their next penalty, then Diego Lugano saw his effort saved by Brazil goalkeeper Doni, who appeared to move several meters before the kick was taken. Both teams had previously missed one kick each.
The game ended in an ugly scuffle after Brazil's celebrations appeared to provoke Uruguay as they repeated their penalty shootout win over the same opponents at the same stage of the previous tournament three years ago.
Earlier, Maicon put Brazil ahead early on before a floodlight failure stopped the first half after 14 minutes.
Diego Forlan equalized after the re-start only for Julio Baptista to head Brazil back in front before halftime. Substitute Sebastian Abreu pulled Uruguay level again midway through the second half.
While Uruguay coach Oscar Tabarez and his players left without commenting, Brazil coach Dunga talked about the importance of suffering.
"To be a winning team, you have to know how to suffer," said Dunga, whose top two players Ronaldinho and Kaka both asked to miss the tournament because they were tired. "In the most difficult moment, you have to have posture, courage and fight until the end."
The game, played in sapping heat and humidity, got off to a cautious start but Brazil went ahead in the 13th minute after producing the first flowing move of the game.
A break down the right ended with Fabian Carini superbly saving Mineiro's shot only for Maicon to snap up the rebound.
Uruguay came back into the game after a 14-minute blackout with Alvaro Recoba's inswinging free kicks and corners causing havoc in the Brazil defence.
Doni was forced to punch away three Recoba corners from under his crossbar and made a superb save to turn away Forlan's shot on the turn.
In the fourth minute of time added on for the floodlight failure, Doni failed to clear a Recoba cross and the ball fell to Forlan, who scored with a low shot from the edge of the penalty area.
Brazil regained the lead five minutes later when Julio Baptista headed in following a free kick.
Uruguay pulled level again in the 70th minute through Abreu, who replaced Recoba at halftime.
Jorge Fucile slipped the ball to Cristian Rodriguez on the left, his cross from the byline was headed on by Forlan and reached Abreu, who scrambled the ball in at the far post.
After struggling through the first three group matches with just one goal -- the lowest of any of the 12 teams -- Uruguay came alive in their quarter-final match by eliminating hosts Venezuela 4-1.
Brazil also had something to prove, following their opening 2-0 upset at the hands of Mexico, and did so in fine jogo bonito form by thrashing Chile 6-1.