After two years of maneuvering, high-ranking Senate Republicans and Democrats on Thursday unveiled a compromise to bring significant reform to the criminal justice system through a series of sentencing and prison reforms long sought by both liberals and conservatives.

“This historic bill addresses legitimate over-incarceration concerns while targeting violent criminals and masterminds in the drug trade,” said Senate Judiciary Committee Chair Charles Grassley (R-Iowa). “It’s the product of thoughtful bipartisan deliberation.”

If approved, the bill would shorten the length of mandatory sentences for repeat drug offenders and would end the federal “three strikes” mandatory life provision. It would also expand the judicial discretion “safety valve,” allowing low-level drug offenders to be sentenced to less time than currently dictated under existing mandatory terms.

The sentencing reforms would apply retroactively, allowing inmates who were previously incarcerated under mandatory minimums that have been shortened an opportunity for release.

The legislation quickly drew praise from advocacy groups on both sides of the aisle, who urged its passage in the Senate and adoption in the House.

“Today is an historic moment. It’s more than symbolic,” said Christine Leonard, executive director of the Coalition for Public Safety, a criminal justice group funded in part by Koch Industries.

Leonard’s group has partnered with both liberal and conservative groups to pressure lawmakers on reform.

“This approach exceeds expectations,” she said.

The bipartisan proposal is sponsored by Grassley, Judiciary Ranking Member Patrick Leahy (D-Vt.); Senate Majority Whip John Cornyn (R-Texas); and Democratic Sens. Richard Durbin (Ill.), Sheldon Whitehouse (R.I.), Charles Schumer (N.Y.) and Cory Booker (N.J.). Republican Mike Lee (Utah) is also behind it.

“After years of having a justice system that has really held the nation back, today is really a step forward,” said Booker, the only co-sponsor who is not on Judiciary, in an interview.

Booker and other left-leaning senators said they wish parts of the legislation would have gone further. Specifically, they want even larger rollbacks to mandatory minimums  — the bill does not actually eliminate any mandatory minimums but instead reduces them.

Nonetheless, the Democrats said the package is a step in the right direction.

“I would have liked to see the dials turned more. But I think that the way to think about this is that a lot of dials were turned, and that’s a start.” Booker said. “With all of the cynicism about Washington, this is a really a sign of how the place can work.”

The legislation does create two new mandatory minimums for crimes involving interstate domestic violence and providing weapons to terrorists. But criminal justice experts note those new requirements would impact very few criminals.

“There’s some symbolic tough-on-crime theater in this bill,” said John Pfaff, a law professor and researcher on criminal sentencing at Fordham University. “There are almost no federal domestic violence or terrorism cases, so those new mandatories will affect almost no one.”

Co-sponsors heaped praise on Grassley, who was long seen as the major obstacle to producing such comprehensive reform. Liberal activists feared that Grassley would either block any compromise or insist on the inclusion of provisions that would doom the bill if it ever came up for a vote. As recently as the day before the bill’s introduction, criminal justice advocates remained deeply skeptical that the legislation would contain the teeth of real reform.

But once unveiled, the package earned quick praise from several of the most prominent pro-reform groups.

“This bill isn’t the full repeal of mandatory minimum sentences we ultimately need,” said Julie Stewart, president of Families Against Mandatory Minimums, in a statement. “But it is a substantial improvement over the status quo and will fix some of the worst injustices created by federal mandatory sentences.”

With so much support from senior lawmakers, including a member of the GOP Senate leadership, observers believe the compromise has a good chance of coming up for a Senate vote sometime before the end of this year.

“What we’ve had today is an indication of bipartisan support,” said Durbin, who along with other co-sponsors said they are confident the Senate will approve the measure.

The bill faces a potentially more perilous path in the House, where lawmakers are currently working on their own version of reform.

“Well what’s going to happen in the House? I don’t know, I honestly don’t know,” Durbin said.

“Who knows!” added Schumer.