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".