The US Senate has passed a sweeping criminal justice reform bill seeking to address concerns that the US locks up too many of its citizens.
The First Step Act, which has been championed by US President Donald Trump, passed by a vote of 87-12.
The bipartisan measure found unlikely support from hardline conservatives and progressive liberals alike.
The US leads the world in number of jailed citizens. Around 2.2m Americans were in jail in 2016, figures show.
The bill, which is expected to be debated in the House of Representatives on Wednesday, only affected federal prisoners which make up approximately 10% of the total US prison population.
Moments after the vote passed, President Trump tweeted: “America is the greatest Country in the world and my job is to fight for ALL citizens, even those who have made mistakes.”
What does the law actually do?
The bill would overhaul the US justice system by giving more discretion to judges during sentencing, and by strengthening prisoner rehabilitation efforts.
Among the sentencing guidelines being revises is one reducing the “three strikes” penalty for drug felons from life in prison to 25 years.
It also retroactively changes guidelines that differentiate between powder and crack cocaine – a change which could affect up to 2,600 prisoners according to the Marshall Project.
It allows for more criminals to serve their sentences in halfway houses or under home confinement, and requires offenders to be jailed within 500 miles (800km) from their families.
It bans shackling pregnant prisoners and mandates that tampons and sanitary napkins be available to women.
It reduces the mandatory minimum sentences for serious drug crimes, and authorises $375m (£297m) in federal spending for job training and educational programmes for prisoners.
New Jersey Democratic Cory Booker hailed the legislation as “one small step [which] will affect thousands and thousands of lives”.
How did it get this far?
All 49 Democrats in the Senate voted in favour of the bill, with several citing how prisons are disproportionally filled with minority groups.
Twelve conservative law-and-order Republican senators voted against the bill, after filing several failed amendments in an attempt to halt some reforms that are intended to release more convicts back into their communities.
Many of the supporters of the First Step Act had also rallied behind the Sentencing Reform and Corrections Act of 2015, which was supported by former President Barack Obama.
That bill looked set for passage before Republican Senate Leader Mitch McConnell blocked it, and refused to put it to a vote in the run-up to the 2016 election.
Earlier this year, White House advisor Jared Kushner began working with Republicans to draft a bill that Mr Trump could sign into law.
With Mr Trump’s endorsement, the Republican group was able to shore up enough support to bring the bill to a vote.
“This is the biggest thing,” said Republican Senate Judiciary Chairman Chuck Grassley after the vote was held.