SAO PAULO -- Public transport largely came to a halt across much of Brazil on Friday as demonstrators blocked roads and clashed with police in a general strike to protest proposed changes to labour laws and the pension system.

Millions stayed home on Friday, and thousands flooded the streets in anger, raising questions about whether President Michel Temer will be able to push his proposals through Congress, where they had previously looked likely to pass.

Temer's administration argues that more flexible labour rules will revive a moribund economy and warns the pension system will go bankrupt without changes. Unions and other groups called for the strike, saying that the changes before Congress will make workers too vulnerable and strip away too many benefits.

In one the largest demonstrations Friday, thousands of protesters gathered in front Rio de Janeiro's state assembly in the afternoon and were fighting pitched battles with police who tried to remove them. Police fired tear gas while protesters threw stones and lit small fires in the middle of streets around the legislative building in downtown.

A few hundred more protesters massed on a major avenue in Sao Paulo, where police told downtown shopkeepers to close early, apparently out of concern that protesters might head there. Throughout the day, 21 people were arrested in Sao Paulo, according to military police.

Earlier in the day, most commuter trains and metro lines were stopped in Sao Paulo during the height of morning commute, and all buses stayed off the roads. Buses ran partial service during the morning in Rio de Janeiro but later began returning to normal. The metro was closed for the day in the capital of Brasilia.

Some protesters also set up barricades and started fires in the streets, including on roads heading to the main airports in Sao Paulo. In Rio, protesters created confusion by running through Santos Dumont Airport, and others blocked a major road.

Some plane mechanics joined the strike, according to the National Aeronautic Union, but the impact was minimal, with only a handful of flights cancelled or delayed at the two cities' airports.

"We are demanding our rights, as workers, because the president of the country proposed a law for people to work more and live less, so you will only receive your pension when you die," said Edgar Fernandes, a dock worker who was protesting in Rio.

The CUT union said around 35 million Brazilians didn't show up for work on Friday, more than one-third of the working population. But the government downplayed the strike, insisting that many Brazilians were still at work.

"We don't have a strike, we have widespread riots," Justice Minister Osmar Serraglio said on Joven Pam radio.

Brazil's economy is in a deep recession, and many Brazilians are frustrated with Temer's government. Temer has argued that the proposed changes will benefit Brazilians in the long run. But with so many out of work, many feel they can ill afford any cuts to their benefits.

Underscoring the economic malaise, the IBGE statistics agency announced on Friday that unemployment had jumped to 13.7 per cent in the first quarter of the year, up from 12 per cent.

The anger over the proposed changes to benefits shows that Temer's government has failed to convince the people that the moves are necessary, said Oliver Stuenkel, who teaches international relations at the Fundacao Getulio Vargas university in Sao Paulo. And yet, the proposed laws have been moving fairly easily through Congress, and had been expected to eventually pass.

"This is a peculiar government that has low approval and still gets work done in Congress," he said. "But lawmakers also think of their re-elections next year. After today, there could be a bigger risk for Temer in getting any meaningful bills passed."

Fisch reported from Rio de Janeiro. Associated Press journalists Peter Prengaman in Rio de Janeiro and Sarah DiLorenzo in Sao Paulo contributed to this report.