The U.S. Senate has overwhelmingly passed criminal justice reform legislation championed by President Donald Trump.

The First Step Act, which cleared the Senate 87-12 on Tuesday, would give judges more discretion to impose lesser sentences on defendants convicted of federal crimes and allow inmates in the federal prison system to earn credits by participating in vocational and educational training that would let them get out of prison earlier.