Thousands of Argentine football fans gathered on the golden sands of Copacabana beach gasped and then fell into silence when Germany scored a stunning extra-time goal to claim the World Cup title.
The final broke records with the most tweets per minute of any event posted during the game.
There were 32.1 million tweets about the match worldwide, with around 618,725 made per minute, official figures from Twitter showed.
Germany's goalscorer Mario Gotze was the most mentioned player.
More than 70,000 Argentina fans packed into Rio de Janeiro in recent days, many travelling more than 40 hours by car and seemingly all wearing their team's sky-blue shirts and chanting day and night.
"This was a trauma. We were going to be able to leave singing songs in victory with the glory of the Cup," said Joao Cuenca, who has an Argentine father and a Brazilian mother. "What happened is nothing short of a disaster."
He spoke from the FIFA Fan Fest area on Copacabana beach, where 20,000 people, mostly Argentine, stood shoulder-to-shoulder in front of a giant TV screen to watch the final.
Some isolated fights broke out both on Copacabana beach and in the area outside the Maracana stadium where the match was played. The scuffles appeared to involve young Brazilian and Argentine men - bitter rivals on and off the pitch.
Police responded quickly. There was a heavy security presence around the stadium and across Rio for the entire day.
More than 25,000 police and soldiers were on guard just for the game, according to officials, providing the biggest security detail in Brazilian history.
Daniel Brauner, a 28-year-old student from Hamburg, was one of the few German revellers on the beach.
"I can't realise it still. I am very happy of course but I didn't expect for it to be so close," he said, wiping sweat from his brow with the corner of a German flag after his country's 1-0 win.
"I was expecting 3-1 for Germany. I suffered, the whole match I suffered."
German fan Marten Caesar, downing beers in celebration with compatriots at a bar just outside the Maracana, said: "This final was a real final.
"One goal and that's it. Defence wins tonight and our defence proved it. "They neutralised Messi and Messi was a mess."
Inside the stadium, world leaders including Russian President Vladimir Putin, whose nation will host the 2018 World Cup, and German Chancellor Angela Merkel were sitting in the stands with FIFA's President Sepp Blatter.
With Brazil roundly praised for how it has staged the tournament, considered by many fans to be among the most exciting in recent decades, authorities were taking no chances of anything ruining their big day.
Around the Maracana, where 74,000 spectators crammed in for the final, lines of security forces wearing camouflage uniforms and carrying rifles stood watch.
Roads were closed and military helicopters buzzed overhead, with Brazilian authorities still wary about violent protests that marred last year's Confederations Cup warm-up event.
Several hundred protesters gathered at a plaza near Maracana a few hours before kick-off, and clashed with police as they neared security perimeters set up roughly 1.25 miles from the stadium.
Police fired tear gas and stun grenades to disperse the march. At the end of the demonstration, police unleashed the stun grenades gratuitously on a small group of protesters and journalists, and were seen beating some with night sticks. At least one photographer suffered minor injuries.
For the Brazilian fans, the football ended in disappointment with a 7-1 rout at the hands of the Germans in the semi-finals, but the tournament has been hailed as a great success.
"We did ok, yes?" said a Brazilian walking around the outskirts of the Maracana wearing his team's canary-yellow shirt.
In Buenos Aires, riot police used tear gas and rubber bullets to disperse a group of rock-throwing vandals who disturbed a rally by Argentines celebrating their team's gutsy performance.
Thousands of people, saddened but proud, had gathered peacefully at the Obelisk in central Buenos Aires to applaud their team's best World Cup performance in 24 years.
Police initially remained on the sidelines as fans poured into central Buenos Aires, but later on they began chasing down vandals.
The youths, many of them with their faces covered and drinking heavily, responded by hurling rocks, destroying store fronts, tearing down street lights and even breaking into a theatre.
Parents with small children could be seen fleeing in fear. Police said 20 officers were injured and at least 60 people were arrested.
The chaotic situation marred what was an otherwise spontaneous show of support for Argentina's national team.
The centre of festivities was the Obelisk, where fans traditionally gather to celebrate victory, not defeat.
Cars honked staccato rhythms, firecrackers were tossed into the air and fans of all ages jumped in place shouting "Argentina! Argentina! Argentina!"
"We have nothing to regret, we played first rate," said 53-year-old Horacio Laseiras, carrying his six-year-old daughter on his shoulders.