WASHINGTON — The House passed The First Step Act — the bipartisan criminal justice reform bill — by an overwhelming margin on Thursday, sending the legislation to President Donald Trump's desk for his signature.

The House passed the bill by a 358 to 36 margin after the Senate passed it earlier this week by an 87 to 12 margin.

Soon after its passage, Trump tweeted that the measure represented a "great" bipartisan achievement.

"Congress just passed the Criminal Justice Reform Bill known as the #FirstStepAct," Trump wrote. "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.!!"

The bill provides sweeping changes to the federal criminal justice system, particularly for non-violent drug offenders. Soon, judges will have additional discretion in sentencing such offenders while some of those who have accumulated three violations in the federal system — known as "three strikes" — will see their life sentences reduced to 25 years.

The legislation also promotes rehabilitation efforts for inmates.

Following passage in the Senate earlier this week, Trump declared on Twitter that he looked forward to signing the bill into law.

"America is the greatest Country in the world and my job is to fight for ALL citizens, even those who have made mistakes," Trump wrote. "This will keep our communities safer, and provide hope and a second chance, to those who earn it."

Alex Moe reported from Washington, and Allan Smith reported from New York.