Police launched tear gas and stun grenades to disperse some 300 anti-World Cup protestors who tried to march toward Rio de Janeiro's Maracana Stadium shortly before the Argentina-Germany final.
The demonstrators were protesting against police repression and the country's lacklustre health care when authorities intervened, one day after 19 activists accused of vandalism were arrested.
At least one protestor was detained while mounted police were sent in to block the march.
The protestors held banners reading "Free the prisoners, dictatorship never again" and "They call me Neymar and they take care of my health," referring to the football star's injury during the tournament.
"The Cup is ending but the problems remain," Erin Morais de Melo, a prosthodontist disguised as Batman, said before riot police broke up the protest.
"The central issue is the need to improve public services, our weak education system, health care and security," he said.
Brazil was hit by massive protests during last year's Confederations Cup, a dress rehearsal to this year's event, denouncing the record $11 billion spent on the tournament and demanding better public services.
But the protests have been much smaller during the World Cup, with police using tear gas and stun grenades to disperse a small gathering before the June 12 opening game in Sao Paulo.
Fans flood into Rio
Earlier, tens of thousands of fans had flocked to the World Cup final as millions of Brazilians and people across South America celebrated the last game in their monthlong football festival.
Workers and supporters started arriving at the Maracana Stadium by 9 a.m. local time (midnight NZ time), with queues trailing around the stadium seven hours head of kickoff. Security forces were on site earlier, preparing for Brazil's big day. More than 25,000 police and soldiers were set to be on guard for the game, according to officials, the biggest security detail in Brazilian history.
Inside the stadium, world leaders including Russian President Vladimir Putin and German Chancellor Angela Merkel will witness football's biggest match and one of sport's great occasions alongside Brazilian President Dilma Rousseff. With such VIPs attending, Brazil was taking no chances at the very end of a tournament that has been praised as a surprising success.
Rio de Janeiro's Copacabana beach, meanwhile, was awash in the sky blue of Argentina's football jerseys as thousands of rowdy fans gathered hours ahead of the title match, some of them driving for nearly two days to join the festivities. Rio officials have estimated that at least 70,000 fans from Argentina are in Rio.
Javier Gonzalez traveled 40 hours by car from Buenos Aires. He and four friends are holding out hopes of finding tickets for the final -- but only have $230 a piece to spend, far less than what scalped tickets are going for. But he reckons Brazilians with tickets will soon be desperate to be rid of them.
Gonzalez says that if Argentina loses, he'll head home tomorrow.
"But if they win," he added hopefully, "we might not leave at all."
Around the Maracana, where 74,000 spectators will cram 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 that the violent protests that marred last year's Confederations Cup warm-up event may reappear.
Fabiane Chiesa lives about 75 meters from the Maracana, Brazil's hallowed arena that rises from the midst of a Rio neighborhood. Chiesa's street is blocked at both ends. She said essentially she cannot leave her house today until 11 p.m., when police lift the blockade.
"It is a bit inconvenient, and I can't invite friends over to watch the match," she said. "They could not get past the soldiers. On the other hand, I've never felt safer."
But Brazil was hoping to blend the serious issue of security with fun for the fans.
Across the road from the lines of military police surrounding the stadium, Argentina supporters danced and sang in a cafe, eagerly awaiting their chance to win the World Cup for the first time since Diego Maradona's team in 1986.
"Messi will lift it! Messi will lift it!" the Argentines chanted, hoping that their new star player Lionel Messi will pick up the solid gold trophy at the end.
German fans were filtering in, too, hoping for a fourth world title. There were also supporters wearing Colombia, Mexico, Northern Ireland and Brazil shirts, and many more.
For the host country, the football ended in disappointment with a 7-1 rout at the hands of the Germans in the semifinals, but the tournament -- with one game to go -- 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.