BELO HORIZONTE, Brazil -- Brazilian protesters and police clashed Wednesday near a stadium hosting a Confederations Cup football match, with tens of thousands of demonstrators trying to march on the site confronting police firing tear gas and rubber bullets.

Anti-government protesters in part angered by the billions spent in World Cup preparations picked up tear gas canisters and lobbed them back at police, along with a shower of rocks. A dense fog of the acrid gas enveloped the mass of protesters, about a mile (2 kilometres) away from the stadium where Brazil was playing Uruguay in a semifinal match of the warm-up tournament for next year's World Cup.

Police set up 2-kilometre (1-mile) perimeter around the stadium, normal procedure for international tournaments. Mounted police and riot units maintained another security line about 1 kilometre (half-mile) from the stadium.

"The protesters started this when they tried to break through our outer barrier," said police Capt. Flavio Almeida. "We had no choice but to respond."

About 50,000 protesters had earlier massed in a central plaza in Belo Horizonte.

"We don't need the World Cup," said Leonardo Fabri, a 19-year-old protester. "We need education, we need better health services, a more humane police."

It's the latest protest to turn violent as Latin America's biggest nation has been hit by nationwide protests since June 17.

Elsewhere in Brazil the situation was mostly calm, in part because Brazil's congress shelved legislation that was a target of nationwide protests. Peaceful protests were seen in Brasilia and the northeastern city of Recife

The lower house of congress voted 403-9 late Tuesday to drop a measure that would have limited the investigative powers of federal prosecutors, a bill that many feared would make it harder to prosecute official corruption.

The wave of protests that hit Brazil began as opposition to transportation fare hikes, then expanded to a laundry list of causes including anger at high taxes, poor services and high World Cup spending, before coalescing around the issue of rampant government corruption.

It has become the largest eruption of public demonstrations Latin America's biggest nation has seen in two decades.

At many protests across Brazil in the past week, a sea of signs denounced the proposal to strip prosecutors of the ability to investigate, known as the "PEC 37" measure. Many demonstrators vowed to keep returning to the streets until it was knocked down.

"The PEC 37 only served to protect the corrupt," said Aline Campos, a 29-year-old publicist at a recent protest in Brasilia. "Society wants more effort to combat corruption, not less."

Federal prosecutors were behind the investigation into the so-called "mensalao" cash-for-votes scheme that came to light in 2005. It involved top aides of former President Luiz Inacio Lula da Silva buying off members of congress to vote for their legislation.

Last year, the supreme court sentenced two dozen people in connection with the case, and it was hailed as a watershed moment in Brazil's fight against corruption. However, those sentenced have yet to be jailed because of appeals, a delay that has enraged Brazilians.

On Wednesday, the top court again flexed its anti-corruption muscles by ordering the immediate imprisonment of congressman Natan Donadon, who was found guilty on corruption charges in 2010 and who has now exhausted all appeals.

Before mass protests broke out on June 17, the PEC 37 legislation appeared heading to easy victory in the lower house of congress.

"It was on the streets that the blindness of the politicians was lifted," said Domingos Dutra, a congressman who has often butted heads with leaders of his ruling Workers Party.

Congress also approved a bill earmarking 75 per cent of oil royalties to fund education and 25 per cent to health services.

Earlier this week, President Dilma Rousseff announced investments of $23 billion in transportation and said her government would start projects aimed at five key areas where protesters have demanded improvements: fiscal responsibility and controlling inflation, political reform, health care, public transport and education.

Rousseff also said she would push for an assembly with power for propose constitutional amendments that that would hear from the Brazilian public. Opposition lawmakers questioned that action, arguing that only congress has the right to call such an assembly.

After meeting with the chief justice of the supreme court on Tuesday, Rousseff's office said Wednesday she will continue to push for a plebiscite on political reform, but dropped the push for the constitutional assembly.

In Belo Horizonte, protester earlier Jose Barbosa Neto used a megaphone to try to talk to Brazil's football players outside the hotel where they were staying.

"I'm against all the money that was spent to build stadiums while our people are suffering across the country. I'm here protesting peacefully for a better country," he said. "I don't want to be watching these matches, I'd rather be protesting for a better country."