Protesters have clashed with the police in Brazil's largest cities, Rio de Janeiro and Sao Paulo, after marches in support of striking teachers.
Soon after a peaceful march by more than 5,000 people ended in Rio, a much smaller masked group attacked shops, set fire to a police car and threw petrol bombs.
There were also clashes in Sao Paulo, where shops were ransacked.
Police responded with tear and pepper gas and detained dozens of people, reports the BBC.
Four officers were injured and seven banks were vandalized during the unrest in Sao Paulo, according to Reuters news agency.
Extra police had been deployed in Rio de Janeiro for the huge protest coinciding with Teacher's Day, on which the country recognises the profession.
Many shops and banks had boarded up their windows after last week's larger protests, which had gathered more than 10,000 supporters.
Police also cordoned off the Rio House of Representatives, which was targeted last week.
After the end of Tuesday's march, masked protesters from the so-called Black Bloc anarchist group set fire to the boards, as well as public telephones, rubbish bags and other street furniture.
Metal boards were also taken by some groups and used as shield to confront the police.
A police car was set alight and protest slogans written on walls.
Teachers in Rio are demanding better working conditions and salaries and have the support of colleagues in other cities.
They have been on strike for two months and many complained that Rio's state government had started procedures to sanction the striking teachers.
But on Tuesday night, a Supreme Court judge said it considered the government's actions illegal.
"[The sanctions] discourage, even if in a round-about way, the civil servant's right to freedom of expressions through strike, a truly fundamental guarantee," judge Luiz Fux told Brazil's state news agency, Agencia Brasil.
Fux also summoned union leaders and government officials for talks on 22 October.