Police and small groups of protesters clashed in Brazil's two biggest cities last night after the end of peaceful demonstrations demanding better pay for teachers and affordable housing.
As most demonstrators headed home in Rio de Janeiro and Sao Paulo, hundreds of masked members of the so-called Black Bloc anarchist group started hurling gasoline bombs, rocks, bottles and pieces of wood at police.
Officers used tear gas and percussion grenades to disperse the activists.
In Rio, police said about 4,000 demonstrators gathered in the city centre to mark National Teachers Day and show their support for teachers who have been on strike for more than two months seeking higher pay.
There were s imilar scenes of violence in Sao Paulo, where Black Bloc activists also attacked police, bringing an early end to a march by several hundred demonstrators toward the governor's palace.
Earlier, activists from the "Roofless" movement tried to invade the Sao Paulo city council building, but were pushed back by police.
They later regrouped in front of city hall in a peaceful rally that lasted about two hours.
Last week, a largely peaceful rally by some 20,000 demonstrators turned violent in Rio when small groups of masked protesters started hurling rocks and fire bombs at banks, stores and restaurants and set fire to a passenger bus.