Violence broke out in central Rio de Janeiro at rush hour following a march by trade unionists estimated at up to 20,000 people. The protest was part of a union-organised national day of action in which demonstrations were held and roads blocked in all 27 Brazilian states.

Police used teargas and stun bombs on demonstrators in central Rio. Protests were intended to be peaceful but one flashpoint erupted after the discovery of a cardboard box full of homemade molotov cocktails made of beer bottles as the march reached the central Floriano Square.

As a demonstrator smashed the molotov cocktails underfoot police began firing teargas – and panic and violence rapidly ensued. A group of masked protesters threw rocks and fireworks at police while others wrapped scarves around their faces as gas filled the air. In the middle of running battles a soundtrack continued playing the national anthem while a speaker urged calm.

Piles of rubbish and a street stall were set on fire. As riot police regrouped on the steps of the Municipal Theatre a small boy passed out from teargas and was helped by volunteer medics who formed a circle around him. A smaller group of demonstrators then headed to the state government headquarters in Laranjeiras where teargas was also used by police.

Brazilian media blamed anarchist groups for starting trouble – a minority of demonstrators wore anarchist insignia and carried gas masks. But there was also suspicion that the discovery of the molotov cocktails near press and TV crews meant they could have been planted. "There are excesses on both sides," said João Medeiros, one of a group of lawyers from the Brazilian Bar Association volunteering to help arrested demonstrators. "With the teargas bombs, the way police arrive and push people back, we are all victims." Ten people were arrested and one policeman injured, Brazilian media said.

Trade unions, caught off guard by the protest that sent hundreds of thousands on to Brazilian streets in June, were protesting for a 40-hour working week and an end of subcontracted employment, as well as better health and education. Although the general strike unions hoped for on Thursday did not materialise more than 100,000 people demonstrated in 156 cities across Brazil, Globo's G1 news site reported.

More than 80 sections of highway were blocked across Brazil. In Campo Grande, deep in Brazil's interior, 35,000 demonstrated. In Belo Horizonte 7,000 took the streets.

Thousands demonstrated in front of the National Congress in Brasília. There were protests in Recife, Fortaleza and Maceió in the north-east of Brazil, Belém in the Amazon and Florianópolis in the south. The majority of the protests were peaceful.

In Rio, home to Brazil's oil industry, a bid round to auction of a huge offshore subsalt oil prospect in October was targeted by protesting oil workers before violence broke out. Others protested against forced evictions of favelas for World Cup and Olympic works.

Health workers campaigned over low wages. "I haven't had a pay rise in 14 years. I earn 1,900 reals (£553) net a month," said Roberto Salim, a doctor in a public hospital, earlier on in the afternoon.

As the violence calmed down and police regained control of central Rio streets, Wesley Arlley, 19, told the Guardian that a group of police had beaten him up as he passed by the demonstration.

"They asked me to kneel down and a pile of them started to hit me in the face," he said. Police standing near by and listening did not challenge his account, which was confirmed by Jonas Coutinho, a teacher who said he witnessed the police attack.