Updated

The White House claimed a major legislative victory after the Senate on Tuesday night overwhelmingly approved a bipartisan criminal justice reform bill backed by President Trump.

Lawmakers approved the bill 87-12, after defeating three amendments pushed by conservative Republicans.  The measure now goes to the House, where it is expected to be approved quickly. Its passage would mark a significant win for Trump and his son-in-law and senior adviser Jared Kushner, who worked the halls of Congress for months in an effort to forge a compromise.

"This is not for hardened criminals ... it's people who really want to re-enter into society," White House Counselor Kellyanne Conway told "Fox & Friends" Wednesday.

The vote marked a rare moment of bipartisanship, at a time when lawmakers and the Trump administration are clashing over everything from the border wall to the Russia probe.

Trump congratulated the Senate soon after the measure's passage, tweeting: "America is the greatest Country in the world and my job is to fight for ALL citizens, even those who have made mistakes ... This will keep our communities safer, and provide hope and a second chance, to those who earn it." Trump added that he would sign the bill into law.

The legislation would give federal judges more discretion when sentencing some drug offenders and boosts prisoner rehabilitation efforts. It also would reduce life sentences for some drug offenders with three convictions, or "three strikes," to 25 years. Another provision would allow about 2,600 federal prisoners sentenced for crack cocaine offenses before August 2010 the opportunity to petition for a reduced penalty.

The changes were 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.

Sen. Cory Booker, D-N.J., said the nation's prisons are full of Americans who are struggling with mental illness and addiction, and who are overwhelmingly poor. He said the nation's criminal justice system "feeds on certain communities and not on others," and said the bill represents a step toward "healing" for those communities.

"Let's make no mistake, this legislation, which is one small step, will affect thousands and thousands of lives," Booker said.

When the bill appeared to have stalled in recent weeks, Senate Judiciary Committee Chairman Charles Grassley, R-Iowa, pleaded with Senate Majority Leader Mitch McConnell, R-Ky., to bring it up for a vote. With Trump's urging, McConnell eventually agreed and voted for the bill as well.

"The First Step Act takes lessons from history and from states -- our laboratories of democracy -- to reduce crime, save taxpayer dollars and strengthen faith and fairness in our criminal justice system," Grassley said.

Before the bill's passage, senators voted down three amendments introduced by Sens. Tom Cotton, R-Ark., and John Kennedy, R-La. The first, which required that victims be notified before a prisoner is given early release, failed 67-32. The second, which would have required the federal Bureau of Prisons to track and report the re-arrest rate for each prisoner who receives early release, was defeated 66-33. The third, which would have excluded certain prisoners from education and training programs allowing them to toward earlier release to a halfway house or home confinement, was voted down by 62-37.

JUDGE NAPOLITANO: THE SUPREME COURT'S MOST CONTROVERSIAL DECISION SINCE WORLD WAR II

"This would not solve all the problems of the bill, but it would at least ensure some of these most heinous criminals who prey on young children or the vulnerable are not released early from prison," Cotton said in urging lawmakers to support the amendments

Senate Democratic Whip Dick Durbin of Illinois had described the amendments as "poison pills" that would have undone bipartisan support for the bill. He pointed out that authors of the legislation already carved out some 60 different crimes making prisoners ineligible for early supervised release. Durbin also claimed Cotton's amendment was too expansive and would prevent at least 30,000 prisoners from participation.

Durbin said the Federal Bureau of Prisons also gives victims the opportunity to be notified upon a change in the prisoner's status, but it's a choice. He said about 10 percent of victims choose not to be notified because of the trauma involved in revisiting the crime. Meanwhile, the amendment from Cotton and Kennedy would make it a requirement.

"Supporting the Cotton amendment is basically saying to these crime victims, 'We're going to force this information on you whether it's in the best interest of your family, whether you want it or not,"' Durbin said. "That is not respectful of crime victims."

The bill had the support of a rare alliance of conservative and liberal advocacy groups, who said the changes would make the nation's criminal justice system fairer, reduce overcrowding in federal prisons and save taxpayer dollars.

JUDICIAL PANEL DISMISSES MISCONDUCT COMPLAINTS AGAINST JUSTICE BRETT KAVANAUGH

All 12 votes against the bill came from Republican senators: Cotton, Kennedy, John Barrasso of Wyoming, Mike Enzi of Wyoming, John Kyl of Arizona, Lisa Murkowski of Alaska, James Risch of Idaho, Mike Rounds of South Dakota, Marco Rubio of Florida, Ben Sasse of Nebraska, Richard Shelby of Alabama and Dan Sullivan of Alaska. A 13th Republican, Lindsey Graham of South Carolina, did not vote.

The bill would affect only federal prisoners, who make up less than 10 percent of the country's prison population.

Fox News' Chad Pergram and The Associated Press contributed to this report.