By Brad Brooks and Anthony Boadle

SAO PAULO/BRASILIA (Reuters) - Brazilian protesters torched buses, clashed with police in several cities and marched on President Michel Temer's Sao Paulo residence on Friday amid the nation's first general strike in more than two decades.

Unions called the strike to voice anger over Temer's efforts to push austerity measures through congress, bills that would weaken labor laws and trim a generous pension system.

The blackened hulls of at least eight burned commuter buses littered central Rio de Janeiro as police launched rounds of tear gas and rubber bullets at masked protesters.

Despite the protests, Temer and members of his center-right government denounced the strike as a failure. They said that the unions' targeting of public transport meant that people who wanted to go to work were unable to.

Unions said the strike was a success and pointed to adherence by millions of workers in key sectors like automakers, petroleum, schools and even banking. Strikes hit all 26 states and the Federal District.

"It is important for us to send a message to the government that the country is watching what they are doing, taking away workers' rights," said Marco Clemente, head of the 4,000-member radio and TV workers union in Brasilia, leading a picket line outside the headquarters of state broadcaster EBC.

Temer, who was in Brasilia, denounced the violence used by some protesters. He said in an emailed statement that "small groups" had blocked the population from using public transport and said that "work toward the modernization of national legislation will continue."

Brazil's last general strike took place in 1996, in protests over privatizations and labor reforms under former President Fernando Henrique Cardoso.

Despite Friday's action, many analysts said the strike would have little immediate impact on the president's austerity push, and that the bills are still expected to pass given Temer's continued support among lawmakers.

BRAZILIANS ANGRY AT REFORMS

Temer's reforms have deeply angered many Brazilians and he is weighed down by a 10 percent approval rating for his government.

He took over last year when former leader Dilma Rousseff, whom Temer served as vice president, was impeached for breaking budgetary rules. Her supporters denounced the act as a 'coup' orchestrated by Temer and his allies in a bid to derail a sweeping corruption investigation.

"This is not a government that was elected with these proposals," said Bernard Costa, a 27-year-old medical student protesting in Sao Paulo. "These reforms are showing people that this government has is neither legitimate nor representative."

"Shameless government" read one placard waved by one of a group of protesters who gathered outside Temer's family home in Sao Paulo. Police used tear gas to disperse the crowd.

Nearly one-third of Temer's ministers and several congressional leaders are under investigation in Brazil's largest political graft scheme yet uncovered. It revolves around kickbacks from construction companies in return for winning lucrative projects at state-run oil company Petrobras .

Temer has proposed a minimum age for retirement, which would compel many employees to work longer to receive a pension and reduce payouts in a country were many workers retire with full benefits in their 50s.

The lower house of Congress approved a bill this week to weaken labor laws by relaxing restrictions on outsourcing and temporary contracts, further inflaming union resistance.

The government argues that economic reforms are needed to pull Brazil out of its worst recession on record, cut a huge budget deficit, reduce record unemployment and modernize the economy.

The strike had a large impact on auto production in Sao Paulo, which concentrates the bulk of the industry in Brazil.

General Motors Co , Ford Motor Co , Toyota Motor Corp <7203.T> and Mercedes-Benz parent Daimler AG all halted production, according to company officials, unions and market analysts. Fiat Chrysler Automobiles NV , the No. 1 car seller Brazil, said it was operating normally.

Union officials said most workers at state-run oil producer Petroleo Brasileiro SA , known as Petrobras, joined the strike, but the company said the stoppage had no significant impact on output. Iron ore miner Vale SA said the strike did not affect its operations.

Story continues