The former US Open champion Del Potro clinched the big win on secondmatch point with a little help from the netcord on a forehand strokeafter 2 hours 27 minutes.
The two embraced at the net and the tears then flowed as thedisappointed Djokovic failed again in his bid for the elusive gold.He completed a career grand slam at the French Open in June but thensuffered a surprise defeat in the third round of Wimbledon againstSam Querrey.
Del Potro meanwhile cried tears of joy after the monumental win, onlyhis fourth in the 15th meeting with Djokovic, but the second one atthe Olympics as he also won their bronze medal game at London 2012.
He fired 41 winners to Djokovic's 24 and also had the upper hand inunforced errors, 24-32.
Djokovic was in good company on the sidelines though on a windy andcool day, as Serena and Venus Williams' bid for a fourth straightwomen's doubles also ended in the first round, just as Wimbledonchampion Andy Murray's doubles campaign with his brother Jamie.
But Del Potro stole the show on the day - even though he was stuckin an elevator for 40 minutes in the athletes' village in the morning- in front of a noisy crowd with a big Argentine contingent and theBrazilian fans firmly behind Djokovicv against the player from theirregional arch-rivals.
The 2009 US Open winner Del Potro has dropped to 145th in therankings after several wrist operations but was considered the mostdangerous floater in the field and the toughest draw Djokovic couldhave had.
Djokovic's defeat further opens up the Rio draw that saw only fivetop-10 players, with Swiss Roger Federer and Stan Wawrinka the mostprominent absentees.
The Williams sisters meanwhile lost a first Olympic doubles matchwhen they were ousted 6-3, 6-4 defeat against Czech Fed Cup winnersLucie Safarova and Barbora Strycova. The sister act had won 15matches in a row en route to gold in 2004, 2008 and 2012, and eachalso has a singles gold.
Venus Williams was however not at full strength as she is sufferingfrom a virus. The 36-year-old also crashed out in the first round ofthe singles, but on Sunday didn't want to use that as an excuseagainst the Fed Cup champions.
"Today was not our best day as a team. We like to play into thetournament but we played a tough team," she said.
Serena agreed: "We played terrible and that basically showed in theresults. I don't know why. I wasn't playing the way I needed to play,I wasn't crossing the way I needed to cross. It was what it was."
The Murrays meanwhile went out 7-6 (8-6) 7-6 (16-14) againstBrazilians Thomaz Bellucci and Andre Sa.