By Steve Keating

RIO DE JANEIRO (Reuters) - Argentina may not win gold in Olympic men's basketball but gave their fans the next best thing, beating bitter rivals Brazil 111-107 in double overtime on Saturday, to all but end the host's hopes of reaching the knockout round.

With the victory, Argentina (3-1) moved to the top of the Group B standings on seven points while Brazil sat fifth in the six-team pool on five points and little chance of advancing.

At the final buzzer, Brazil supporters, who had spent the final minutes chanting "eu acredito" (I believe), were left exhausted and stunned while Argentine fans celebrated, delighting in the particular cruel manner of their victory.

The game featured everything expected from two fierce sporting rivals with legitimate basketball pedigrees.

The pulsating showdown ebbed and flowed through four quarters and two overtimes that was finally decided when Manu Ginobili, who had a chance to end it in the first overtime with a last ditch shot, dropped two free throws with three seconds on the clock to put the contest out of reach.

"What had to happen, happened," said Ginobili. "I hope all the fans are just outside drinking beer now."

Andres Nocioni led the Argentines with 37 points, including a big three-pointer in the final seconds of regulation that forced the first overtime, while Facundo Campazzo contributed 33 along with 11 assists. Nene was Brazil's top scorer with 24.

"This match was close. There were all the fans, families here," said Argentina's Carlos Delfino. "We knew the game was going to be close just because of the atmosphere."

As with most Brazil-Argentina clashes, Games officials were taking no chances.

Before the game riot police took up positions under a nearby bridge and around the arena, keeping a discreet distance, while chanting fans lined up under a broiling sun hours before tipoff.

Brazil and Argentina are fierce soccer rivals - a longstanding sporting feud that hit fever pitch when Brazil hosted the 2014 World Cup and has shown no signs of easing with fans from both nations slow to embrace the Olympic spirit of friendly competition.

After a Rio Games opening ceremony that saw Argentina's delegation lustily booed, and a fight between a Brazilian and Argentine fan at a tennis match just days later, sport authorities from both countries met to discuss how to ease tensions.

Even the athletes have pleaded with fans to catch the Olympic spirit and take their soccer rivalry down a notch for other sports.

Before the opening tipoff on Saturday the two captains, Brazil's Marcelinho Huertas and Argentina's Luis Scola addressed the crowd telling them: "We are Latin America brothers. We are counting on you to celebrate the Olympic spirit".

The atmosphere was good natured for most of an entertaining afternoon but turned decidedly profane at the end as both sides unleashed a barrage of insulting soccer chants and songs.

(Additional reporting by Caroline Stauffer; Editing by Alison Williams and Daniel Flynn)