By KEVIN FREKING and LISA MASCARO, Associated Press

WASHINGTON (AP) — 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 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.

The bill is a rare bipartisan endeavor in a typically log-jammed Congress and has attracted support from a coalition of liberal and conservative groups, including the American Civil Liberties Union 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 reform, said an endorsement from the National 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 would save taxpayer dollars by reducing prison populations and giving federal inmates the opportunity to 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.

Grassley said the bill would be easier to pass after the departure of Attorney General Jeff Sessions, who was ousted by Trump last week. Sessions was a longtime opponent of criminal justice reform.

"I think we have a commitment from the Justice Department now to work with us on it," Grassley said.

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 approach would allow thousands of federal prisoners sentenced for crack cocaine offenses before August 2010 the opportunity to petition for a reduced penalty. It would also lower mandatory minimum sentences for some drug offenses. The life sentence for some drug offenders with three convictions, or "three strikes," would be reduced to 25 years.

Senate Majority Leader Mitch McConnell, R-Ky., said he would test support for the measure during the lame-duck session.

Sen. Lindsey Graham, R-S.C., said he talked to the president about the legislation Monday night and that he "seemed supportive."

"I've never been more optimistic than I am now, but we're not there yet," Graham said.

All but two Republicans voted for the House bill when it was overwhelmingly approved in May, 360-59. Democratic lawmakers supported the bill by about a 2-to-1 margin, but opponents voiced concerns that it did not go far enough in giving 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 he or she is 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 National Fraternal Order of Police said the extra help should be targeted to those with the lowest risk "to re-offend." The group said that "truly dangerous offenders," such as those who traffic in fentanyl or commit crimes while armed, would be ineligible under the compromise legislation it's worked on with the Trump administration.

The debate comes after Florida voters approved a measure restoring the voting rights of felons who have served their sentences. The Freedom Partners Action Fund, backed by the Koch brothers, 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.

___

Associated Press writer Mary Clare Jalonick contributed to this report.

___

Follow on Twitter at https://twitter.com/AP_Politics