BRASILIA (Reuters) - Brazil’s lower house of Congress on Wednesday approved the main text of a bill to relax the country’s restrictive labor laws, a main plank of President Michel Temer’s efforts to bolster investment and pull the economy out of its worst recession ever.

FILE PHOTO: Brazil's president Michel Temer looks on before a meeting with Spanish Prime Minister Mariano Rajoy at the Itamaraty Palace in Brasilia, Brazil April 24, 2017. REUTERS/Ueslei Marcelino

The measure passed by 296-177 in an expected victory to Temer who is struggling with low approval ratings amid a sweeping corruption scandal. The lower house still has to vote amendments to the proposal, which scraps some limits to temporary work, before it heads to the Senate.

Despite the victory by a wide margin, Wednesday’s vote shows that Temer still faces some resistance from his allies to secure enough support to approve his unpopular proposal to reform a costly pension system.

The pension reform is expected to face a vote in the lower chamber in the next two weeks but, since it amends Brazil’s constitution, it will require approval by three-fifths of the lawmakers or 308 votes which the government may not have yet.

The labor reform vote was seen by the Temer administration as a thermometer of support for the pension proposal.

Approval of the labor bill by the lower house came two days before a national strike and demonstrations called by labor unions and leftist parties to protest Temer’s reform program that they say undermines workers’ rights to the benefit of business interests.

Backers of the labor bill say it will modernize employment rules that date from the 1950s and encourage investment by lowering labor costs for businesses.

If passed by the Senate, the measure would relax restrictions on temporary workers, introduce guarantees for outsourced work and let collective bargaining agreements between unions and employers override some rules of the labor code.

The bill is fiercely opposed by unions because it would abolish mandatory payment of union dues by Brazilian workers.

Public transport, schools and banks in Brazil’s largest cities are expected to be affected by Friday’s 24-hour strike called by the unions. But the government has a majority in Congress and is confident it will get the reforms approved.

Temer has made concessions to make the pension reform more palatable to lawmakers facing elections next year. The changes have cut fiscal savings by 25 percent, to about 600 billion reais ($190 billion) over 10 years, the Finance Ministry said.