Luis Scola scored 17 points while Carlos Delfino and Manu Ginobili each added 16 as Argentina advanced into the Olympic men's basketball semi-finals on Wednesday by defeating arch-rival Brazil 82-77.
Argentina will face the winner of a later quarter-final between the US NBA Dream Team and Australia.
Reigning European champion Spain and Russia booked berths in Friday's other semi-final with earlier triumphs.
Argentina, which won 2004 Olympic gold and took 2008 Beijing bronze, had only played its South American rival once before in the Olympics, taking a 72-56 triumph in 1952.
Brazil boasted the Olympics' best defence entering the medal playoffs but Delfino torched them for 14 points in the first half and Argentina hit 19-of-32 shots from the field in the first half on the way to a 46-40 lead.
Argentina went on a 9-0 run early in the third quarter, keeping Brazil scoreless for almost four minutes in seizing a 57-44 edge. Andres Nocioni scored five points in the key Argentine spurt.
Brazil answered with a 10-0 run, keeping Argentine scorers silent for nearly three minutes. Nene Hilario scored four points and Alex Garcia capped the spurt with a fast break slam dunk with 4:21 to play, pulling Brazil within 70-68.
Pablo Prigioni and Nocioni responded for Argentina but Leandrinho Barbosa sank a 3-pointer to trim Argentina's edge to 74-71.
Nocioni, Delfino, Prigioni and Scola each sank free throws in the final seconds to seal Brazil's fate.
Marcelinho Huertas and Barbosa each scored 22 points to lead Brazil.