Cannot play media. Sorry, this media is not available in your territory.
Video - Argentina 3-0 Brazil
Argentina beat Brazil 3-0 to set up an Olympic final against Nigeria in the men's football competition.
Sergio Aguero put Argentina ahead on 53 minutes when he chested in a low cross before his glanced shot added a second.
Ronaldinho's free-kick hit the post for Brazil and Alexandre Pato was dubiously ruled offside when he touched in a Marcelo cross in the aftermath.
Juan Riquelme's penalty finished off a Brazil side who had Lucas Leiva and Thiago Neves sent off late on.
Lucas was sent off on 81 minutes for a foul on Liverpool team-mate Javier Mascherano, who was also the victim of a challenge which saw Neves see red minutes later.
The tackles were a signal of Brazil's frustration towards the end of a match in which they only came to life after conceding the opening goal early in the second half.
Up to then, Argentina had shaded a tight affair as both sides lacked a clinical edge in the final third.
But Aguero changed that when he guided home a powerfully struck Angel di Maria cross off his chest from six yards.
Almost immediately, Rafael Sobis hit the post with a well-struck shot as Brazil finally threatened the Argentine goal.
Brazil left themselves exposed searching for an equaliser and Lionel Messi's run across the box started an attack which saw Ezequiel Garay drive in a low cross and Aguero touch in for his side's second just before the hour mark.
Ronaldinho then saw his 25-yard set piece curler come back off the post as the woodwork again denied Brazil and, even though Pato seemed level when he sidefooted in Marcelo's cross, he was ruled offside.
Brazil's misery was only compounded when Riquelme stroked in a penalty after Breno's foul on Aguero and by their late dismissals.
Argentina emerged deserved winners and they will now go on to defend their Olympic title from Athens four years ago.