Brazilian unions have ratcheted up the pressure on president Michel Temer with a nationwide general strike that closed schools, disrupted transport networks and led to clashes with public security in several cities.

Demonstrators in Rio de Janeiro and São Paulo blocked key roads with barricades of burning tires on. Riot police used teargas and percussion grenades to try to disperse the crowds and open the routes.

Domestic media said it was the biggest general strike in decades, with protests reported in 26 states and strikes by teachers, bus drivers, healthcare providers, oil industry workers and public servants.

As night fell on Friday, there were multiple clashes in central Rio between protesters, who set fire to a bus, and riot police, who fired dozens of rounds of tear gas.

Cintia Manoel, a municipal employee, joined the crowd chanting “Fora Temer” (Temer out). Despite the friction, she felt it was necessary to participate. “I was there primarily against the government, which I consider illegitimate, and because of the workers’ rights and pension reform, which made this protest much bigger.”

A demonstrator breaks the windshield of a truck in Rio de Janeiro. Photograph: Leo Correa/AP

Daniela Barbosa, an elementary school teacher, said the proposed changes to the pension system would oblige her to work for several years longer than she wanted.

The protest comes at a difficult time for the labour movement. Earlier this week, congress passed labour law reforms that weaken workers’ rights. The figurehead of the Workers party, Luis Inácio Lula da Silva, is on trial, facing corruption charges.

His successor Rousseff said the strike was a symbol of courage. “This is a historic day,” she said. “In these difficult time, a fight for democracy and in defence of our social gains is the duty of all of us.”

Many voters are furious that politicians are insisting on the need for cuts in benefits and public services even as evidence grows that they benefited personally from illegal kickbacks on overinflated contracts.

Eight cabinet ministers have been implicated in the Lava Jato (Car Wash) investigation into corruption at the country’s two biggest companies, Petrobras and Odebrecht. Temer’s approval ratings have slipped into single digits, similar to the level of his predecessor, Rousseff, when she was impeached last year.

A firefighter works douses a burning bus in Rio. Photograph: Mario Tama/Getty Images

Government spokesman Alexandre Parola played down the significance of the industrial action. “A strike is a part of democracy. It’s acceptable as long as participants stay within the law. The country is still functioning,” he noted.

The shutdown was not total. In Rio, bus and metro companies ran a reduced service. Most shops and banks remained open. But students were told to remain at home and there were skirmishes between protesters and police at Santos Dumont airport and the main bus terminal. São Paulo was hit harder, with a shutdown of many bus lines and fierce clashes on the road to the Congonhas airport. More protests were expected later in the day.

“It is going to be the biggest strike in the history of Brazil,” said Paulo Pereira da Silva, the president of trade union group Força Sindical.

Nara Pavão, a professor in the political science department at the Federal University of Pernambuco, said it would be the biggest mobilization since 1996. He saw this as a sign of a crisis of representation as voters feel betrayed by politicians.

Flávia Biroli, a political science professor at the University of Brasília, said planned austerity cuts had stirred up public anger.

“The general strike shows that the organized sectors of society clearly understand that the proposals, if approved, will be the end of the fundamental guarantees provided for in Brazilian legislation, which will increase instability and poverty.”