In a rare show of unity, Congress on Thursday approved a sweeping criminal-justice-reform bill that was pushed by liberals and conservatives alike.

The House passed the First Step Act by 358 to 36, sending it to President Trump for his signature.

The Senate had approved the measure, 87-12, on Tuesday.

“Congress just passed the Criminal Justice Reform Bill known as the #FirstStepAct. Congratulations! This is a great bi-partisan achievement for everybody. When both parties work together we can keep our Country safer. A wonderful thing for the U.S.A.!!” Trump tweeted.

The legislation gives federal judges more discretion in sentencing some drug offenders and adds programs for prisoner rehabilitation. It also reduces life sentences for some drug offenders with three convictions to 25 years.

Another provision allows about 2,600 federal prisoners hit with stiff sentences in crack-cocaine cases before August 2010 to petition for reduced penalties.

The bill, championed by Jared Kushner, Trump’s son-in-law and adviser, does not affect state jails and prisons.

Kushner, whose real-estate-devloper father, Charles, served 14 months in federal prison for financial crimes, lobbied key Republican and Democratic lawmakers, pitched the bill to the president and persuaded a reluctant Senate Majority Leader Mitch McConnell to bring it to a vote.

Democrats and Republicans praised the bipartisan work.

Rep. Hakeem Jeffries (D-NY) applauded conservatives and liberals as well as the White House for finding common ground.

“We incarcerate more people in the United States of America than any other county in the word,” said Jeffries, putting the current US prison population at 2.2 million.

“It is a scandal,” Jeffries said. “It is a stain on our democratic society. It’s not a Democratic problem or a Republican problem, it’s an American problem.”

Sen. Cory Booker (D-NJ), a frequent critic of the Trump administration, said he put his policy differences aside to provide a second chance to thousands of inmates.

“Could we do more? Yes. This legislation is a product of compromise,” Booker said.

White House officials are planning a signing ceremony on Friday, before Trump departs for Florida for the holidays, The Washington Post reported.

He will be inviting Democrats and Republicans for a bipartisan celebration of the new legislation.