RIO DE JANEIRO (AFP) - Argentina snatched a thrilling 111-107 double-overtime win against Brazil amid fears of fan violence, as Spain kept their Rio Games basketball hopes alive by crushing Lithuania.
Dozens of armed security personnel were deployed for the afternoon game between the Olympic hosts and their fierce regional rivals, with tensions high following previous unruly spectator behaviour in Rio.
Team captains Marcelinho Huertas of Brazil and Luis Scola of Argentina met at half-court before tip-off, addressing the crowd in a bid to nip excess passions in the bud.
"We are South American brothers, and we ask everybody to support us in the spirt of the Olympics and in a civil manner," Huertas said to cheers.
Decades of football rivalry spice any Argentine-Brazil match-up, but no incidents were reported.
Argentina dealt a blow to Brazil's tournament hopes, with forward Andres Nocioni scoring 37 points and guard Facundo Campazzo getting 13 of his 33 in extra time.
Nocioni sank a clutch three-pointer with four seconds in regulation to stun the deafening, mostly Brazilian, crowd and force overtime at 85-85.
Campazzo's fast-break lay-up with 36 seconds left in the first overtime, one of several penetrating drives, tied it again at 95-95 to trigger another overtime.
Argentina gained the lead and held on to ensure a quarter-finals berth by going to a 3-1 record in Group B.
After losing their first two games by a combined three points, 2008 and 2012 silver medallist Spain routed Lithuania 109-59.
Desperate to avoid elimination, Spain's Olympic veterans jumped early on previously unbeaten Lithuania, who had less to play for.
National Basketball Association star centre Pau Gasol led Spain with 23 points, going 5-for-5 from three-point range.
Spain will try to clinch a medal-round berth with a win Monday over tough Argentina, which in turn will fight to ensure they win Group B and avoid the United States in the knockout phase.
The US, in Group A, have not lost an Olympic game since 2004 and are heavily favoured to repeat.
"We have to beat Argentina if we want to be in the next round, and it's going to be like a final for us," said Spain guard Ricky Rubio.
Argentina jumped out to an early 11-point lead over Brazil on 21 first-half points by Nocioni, but Brazil had the crowd roaring as they stormed back to take a 52-44 half-time lead.
But Argentina have four veterans from their 2004 Athens gold-medal winning side including Nocioni, Brooklyn Nets forward Scola, and four-time NBA champ Manu Ginobili, and they refused to buckle.
Brazil face Nigeria next, needing a win and some help.
"We know that we have to keep our heads up and depend on other teams to lose a couple of games," said Brazil guard Leandro Barbosa.
"But we still believe that we can qualify for the second round."
Nigeria aided Brazil's cause somewhat in Saturday's late game, using 17 three-pointers to overwhelm Croatia 90-76.
Argentina and Brazil had met before Saturday's game to discuss how to address their rabid fans.
"We all need to scream, jump, celebrate, cry if they want to, whatever they want to do. But in a civilised matter that we respect," Scola told reporters.
"We wanted to have a big basketball party, and it was."
Brazilians and Argentinians brawled earlier at the Rio tennis venue, and Brazil fans at the Olympic stadium have taunted their rivals with chants referencing legendary Argentinian footballer Diego Maradona's cocaine use.
Brazil's only basketball win so far, a last-gasp escape over Spain, was marred by ugly taunting of Gasol by Brazilian fans.