(RNN/AP) – The Senate passed a bipartisan prison reform bill on Tuesday night, a rare show of agreement in Washington intended to reduce the federal prison population.

The bill, the First Step Act, is also expected to pass the House and be signed into law by President Donald Trump.

The emphasis of the law is on reducing recidivism.

The law provisions “programs to help reduce the risk that prisoners will recidivate upon release from prison, and for other purposes” according to its text.

It also covers a broad range of prison reforms, including prohibiting the use of restraints on pregnant prisoners and amending the Controlled Substances Act to restrict enhanced sentencing for prior drug felonies. It also reduces the life sentence for some drug offenders with three convictions, or “three strikes,” to 25 years.

The changes would only apply to federal prisoners.

It passed the Senate overwhelmingly, in an 87-12 vote.

A major victory for President Trump, he said on Twitter the law “will keep our communities safer, and provide hope and a second chance, to those who earn it.”

....This will keep our communities safer, and provide hope and a second chance, to those who earn it. In addition to everything else, billions of dollars will be saved. I look forward to signing this into law!

Underscoring how support for the legislation crossed the political spectrum, the American Civil Liberties Union tweeted while it was “by no means perfect,” it represented a “common sense” step forward in addressing the country’s “mass incarceration crisis.”

The FIRST STEP Act is by no means perfect — but we’re in the midst of a mass incarceration crisis and the time to act is now.

We’re glad to see common sense prevail in the Senate voting to move this bill closer to the finish line. https://t.co/1PM9kabJuc

“I can’t remember any bill that has this kind of support, left and right, liberal and conservative, Democrat and Republican," said Sen. Dick Durbin, D-IL.

The vote was the culmination of years of negotiations aimed at addressing concerns that the nation’s war on drugs has exploded the prison population without helping people prepare for their return to society.