The congressional push to overhaul the criminal-justice system took a major step forward on Thursday with the introduction of Senate legislation that has the backing of key leaders in both parties.

The bipartisan proposal would reduce the length of mandatory minimum sentences, and limit them to serious drug felonies and violent crimes. It would ban solitary confinement for juveniles and allow them to apply for parole after a maximum of 20 years, and it would grant judges more flexibility in doling out sentences for a range of crimes. The bill would also bolster re-entry programs in federal prisons aimed at reducing recidivism.

Senators have been negotiating a reform measure for months, and advocates said they were surprised both by the scope of the bill and by the impressive array of support lined up behind it. “It’s more comprehensive than what a lot of people had thought,” said Holly Harris, the executive director of the U.S. Justice Action Network, a coalition that represents groups spanning the political divide, including the ACLU and Center for American Progress on the left and FreedomWorks and Americans for Tax Reform on the right.

The Senate proposal still does not go as far as a bipartisan House bill introduced earlier this year, but with backing from a much more powerful coalition of lawmakers, it stands a better chance of serving as the basis for legislation that could ultimately get signed into law. Standing together at a celebratory press conference on Thursday was Senator John Cornyn, the second-ranking Republican, as well as two out of the three leading Democrats, Senators Dick Durbin and Chuck Schumer. They were joined by both African American members of the Senate—Democrat Cory Booker and Republican Tim Scott. Perhaps most crucially, the coalition also included the Republican chairman of the Senate Judiciary Committee, Senator Chuck Grassley of Iowa, who had helped write into law the decades-old sentencing guidelines that lawmakers are now trying to undo. Until a few months ago, Grassley had been openly critical of the bipartisan effort to scrap them.

Grassley’s support did appear to come at a price, however. The Senate proposal does not curtail mandatory sentences as much as the House’s SAFE Justice Act, and it actually adds minimum terms for certain crimes related to gun possession and domestic violence. “Certainly the Safe Justice Act goes farther and is the better bill in that sense,” said Molly Gill, government affairs director for Families Against Mandatory Minimums, a group that—as its name suggests—opposes all minimum sentences “on principle.” Unlike the House bill, the Senate legislation also does not target so-called “over-criminalization” by wiping dozens of federal criminal statutes off the books.

Yet those differences didn’t diminish the enthusiasm among reform advocates, who had grown skeptical in recent weeks that the Senate would strike a deal amid a heated presidential campaign and reported increases in crime in some U.S. cities. Advocates were particularly surprised that the Senate bill makes its changes retroactive in many cases, meaning that an estimated 6,500 inmates sentenced before 2010 could become eligible for release or shortened terms under the proposal. Grassley said the proposal could clear the Judiciary Committee “pretty soon” before heading to the full Senate.

The political outlook in the House is a lot murkier, in part due to the turmoil within the Republican leadership. Outgoing House Speaker John Boehner had endorsed the SAFE Justice Act over the summer, but it’s not clear if his likely successor, Majority Leader Kevin McCarthy, shares his support. The bill faced hurdles in the Judiciary Committee, where Chairman Bob Goodlatte planned to advance criminal-justice reform proposals on a separate, piecemeal track. “It looks like the momentum is more evident in the Senate,” said Nicole Austin-Hillery, Washington director for NYU’s Brennan Center for Justice.

President Obama has made prison and sentencing reform a priority of his final two years in office, having commuted the terms of several dozen drug offenders and visited a federal prison. But much like his failed push for immigration reform in 2013, he has largely stayed out of the congressional negotiations. As with criminal-justice reform, the immigration overhaul gained momentum in the Senate before stalling in the more conservative House. And while it’s possible that will play out in a similar fashion this time around, there is notably less of an organized opposition to rewriting criminal-justice laws. The laughs and hugs that senators exchanged at the Capitol may turn out to be premature, but their effort at reform undoubtedly got a big boost.