The centre of Rio was packed with more than 10,000 people marching peacefully.
But as it got dark, some protesters threw firebombs at public buildings and riot police responded with tear gas.
A similar protest in Sao Paulo also ended in violent confrontation with police after many banks were ransacked by hooded protesters.
Brazil’s security situation is a challenge to cities that will play host to the 2014 World Cup and 2016 Olympic Games.
The latest demonstration took place over several hours and was peaceful at first.
But once night fell, violent incidents broke out as at least 20 “black bloc” anarchists smashed a City Hall gate while others broke into banks and tried to break into ATMs. Some banks were set alight.
Demonstrators also torched a bus on busy Rio Branco Avenue, and took furniture out of banks to use in barricades as the stand-off off with police continued.
Authorities used tear gas to restore order.
“Without the police, there is no violence. When they are there, there always is,” said anarchist Hugo Cryois, 23, who had a gas mask dangling from his neck.
“I came prepared,” he said.
“You can’t trust them.”
Teachers have been demanding a pay increase for two months. About 50,000 people were estimated to have marched to support them before the violence broke out, but police would only confirm the 10,000 estimate.
ojJUq5vXZk4The US House Ethics Committee has voted to release its report on former Republican Representative…
ABC News has agreed to pay $15 million to President-elect Donald Trump to settle a…
South Korea’s parliament has voted to impeach President Yoon Suk Yeol over his failed attempt…
Israeli war planes have carried out more than 100 air strikes in Syria on December…
President-elect Donald Trump has threatened to impose 100% tariffs on the BRICS countries if they…
Syrian troops have withdrawn from the city of Aleppo following an offensive by rebels opposed…