The Brazilian Senate has approved a controversial labour reform bill - the first major overhaul in 70 years.
The law aims to reduce costs for businesses and allow firms to negotiate contracts freely with employees.
It was deeply unpopular with unions, who say it will reduce job security and called two general strikes in protest.
The vote is expected to give president Michel Temer a boost before Congress' lower house decides if he should be suspended to face corruption charges.
The bill will now be sent to president Temer to be signed into law.
The main focus of the bill was on giving more leeway to collective bargaining and reducing the scope for legal action in labour disputes.
Under the labour bill, union dues - currently mandatory - will become voluntary. It also gives more flexibility for part-time work and temporary contracts.
Businesses have welcomed the changes, which they say will make the job market more flexible.
The unions argue they will lead to a reduction in job security in Latin America's biggest economy.
The legislation is part of a raft of business-friendly reforms proposed by president Temer, which include auctions for oil licensing rights, and transport concessions.
The most contentious proposal is to overhaul the social security system.
Analysts say the passing of the labour bill is a victory for Temer, who was charged last month with taking bribes, which he has repeatedly denied.
The lower house of Congress must now vote on whether to allow the Supreme Court to try him.
Want stories like this in your inbox?
Sign up to exclusive daily email
More Stories from Latin America