A small group of protesters confronted police during a huge demonstration that brought 300,000 people into the streets in central Rio de Janeiro to demand better public services in Brazil.
Police used tear gas to dispers a small group of masked men who were allegedly trying to break into the Rio city hall, according to authorities.
The police reaction to the masked rowdies, who threw stones at the city hall and set fire to trash containers, caused a stampede and the vast majority of the demonstrators - who had been peacefully marching up until then - quickly moved out of the area, Efe was able to determine.
The violent demonstrators remained in front of the city hall, which they continued to pelt with stones, but most of the protesters resumed their march in the opposite direction singing the national anthem.
The stone-throwing protesters used large planks and boards to protect themselves from tear gas bombs and rubber bullets fired at them by police.
Although the Rio demonstration was the largest, according to preliminary reports, protesters marched in about 80 other Brazilian cities - including Sao Paulo, Recife, Belo Horizonte and Brasilia - to protest recent hikes in public transport fares, corruption, lack of good public services and deficiencies in education and health care.
Police and a small group of protesters clashed Thursday in the city of Salvador about 3 kilometers (1.8 miles) from the stadium where Uruguay and Nigeria were playing their Confederations Cup soccer match.
Police in anti-riot gear fired dozens of tear gas canisters and were targeted themselves with a shower of stones hurled by the rowdies.
"Without violence, without violence," shouted the demonstrators at police, at times booing them.
Mounted police were later deployed in the area to reinforce security.
The protest, which brought out thousands of people, had begun about 4 p.m. (1600 GMT), five hours before the soccer match.
Besides the issues of transit fares and lack of public services, many Brazilians are unhappy about the amount of public money spent on hosting sports extravaganzas such as the soccer Confederations Cup - now in progress - and the 2014 World Cup. EFE