WASHINGTON — Senators have reached a tentative accord on the first major rewrite of criminal justice sentencing in a generation, but now it’s up to President Donald Trump to decide if it’s worth making a push for the sweeping bipartisan bill during the lame-duck session of Congress.

The package has been a top priority of Trump’s son-in-law, Jared Kushner, and senators presented the ideas to Trump at the White House over the summer. Congressional aides and advocacy groups said the lawmakers are close to an agreement on the legislation, which would boost rehabilitation efforts for federal prisoners and give judges more discretion when sentencing nonviolent offenders, particularly for drug offenses.

Holly Harris, executive director of Justice Action Network, a lead advocacy group, said “we’re hoping for a full-throated endorsement” from the president.

“This will be the most significant departure from the failed mandatory minimum policies of the 1990s,” Harris said. With support from a bipartisan coalition of senators — and top law enforcement groups — she said it’s “decision-making time.”

The bill is a rare bipartisan endeavor in a typically log-jammed Congress and has attracted support from a unique coalition of liberal and conservative groups, including the ACLU and groups backed by the political donors Charles and David Koch. Critics say current sentencing guidelines are unfair and have had a lopsided impact on minority communities.

Mark Holden, general counsel for Koch Industries and a longtime champion of prison reforms, said an endorsement from the Fraternal Order of Police has been critical in generating momentum for the bill.

“You have a lot of people who want to get this done,” Holden said. He said the legislation should help federal inmates be better people when they leave prison than when they entered. “We wouldn’t be in favor of it if it didn’t protect public safety,” Holden said.

The Senate package overhauls some of the mandatory sentencing guidelines that have been in place since 1994 legislation approved by Congress and signed into law by then-President Bill Clinton. Talks involved a bipartisan group headed by Sen. Chuck Grassley, the GOP chairman of the Judiciary Committee, and Sen. Dick Durbin, the chamber’s second-ranking Democrat, and others.

But Trump’s backing remains key to proceeding with any final product.

“Senator Durbin has been negotiating in good faith but there won’t be any agreement on a criminal justice reform compromise unless and until President Trump supports it and asks the Republicans who control both chambers of Congress to move it forward,” said Emily Hampsten, a spokeswoman for the Illinois Democrat.

Kushner may play an outsized role in the final outcome after having steered the legislation this far. “History will say this was a man with a mission,” Harris said. “He was really the critical voice that was able to hold the bipartisan alliance together.”

The federal inmate population has been on the decline since 2013, when it peaked at just more than 219,000. The total now stands at about 181,400, according to the Federal Bureau of Prisons. Still, that’s about triple the number of inmates in federal detention 30 years ago.

The House approved a prison reform bill in May, but the Senate package makes additional changes and adds the sentencing component.

The Senate bill would end the shackling of pregnant women while the sentencing reforms would restrict so-called enhancements that can be added on to extend sentences. The Senate approach would also allow thousands of federal prisoners sentenced for crack cocaine offenses before August 2010 the opportunity to petition for a reduced penalty.

Senate Majority Leader Mitch McConnell, R-Ky., said he would test support for the measure during the lame-duck session after the election. The Senate goes back into session on Tuesday.

The bills would need to be merged. All but two Republicans voted for the House bill when it was overwhelmingly approved in May, 360-59. Democratic lawmakers supported by bill by about a 2-to-1 margin, but opponents voiced concerns that the bill did not go far enough to give judges more discretion to make the punishment fit the crime.

The House bill directs the Bureau of Prisons to conduct assessments for every offender once they’re sentenced and to offer rehabilitation plans designed to lower the chance of recidivism. The plans would include vocational training, education, counseling and substance abuse treatment.

The legislation also allows federal prisoners to serve the final days of their sentences in halfway houses or in home confinement.

It would also prohibit female inmates from being shackled during child birth and provide individuals leaving custody with identification documents that are often pre-requisites for employment.

The debate comes after Florida voters approved a measure restoring the voting rights of felons who have served their sentences.

The Koch-brothers backed Freedom Partners Action Fund and the ACLU chapter in Florida called the measure a way to provide a second chance for Floridians who have served their time and paid their debts.