WASHINGTON (AP) — Under pressure from President Donald Trump and many of his Republican colleagues, Senate Majority Leader Mitch McConnell said Tuesday that he will bring legislation to the floor to overhaul the nation’s sentencing laws.

McConnell’s decision comes after more than three years of overtures from a large, bipartisan group of senators who support the criminal justice bill, including Senate Judiciary Committee Chairman Chuck Grassley and House Speaker Paul Ryan. Trump announced his support for the legislation last month, but McConnell treaded cautiously, as a handful of members in his caucus voiced concerns that it would be too soft on violent criminals.

Texas Sen. John Cornyn, the No. 2 Republican, said Trump’s push for the legislation had been “critical to the outcome.”

“Senator McConnell was always concerned about the small window of time that we have to do all these things we need to do, but the president was insistent that this be included,” he said.

If the legislation passes, it could be a rare bipartisan policy achievement for this Congress and the largest sentencing overhaul in decades. AshLee Strong, a spokeswoman for Ryan, said “the House stands ready to act on the revised Senate criminal justice reform bill.” Ryan has long supported sentencing reform and is retiring at the end of the session.

Most Democrats support the bill, which would revise 1980s and ’90s-era “tough on crime” laws to boost rehabilitation efforts for federal prisoners and give judges more discretion when sentencing nonviolent offenders. It would attempt to focus the toughest sentences on the most violent offenders, lowering mandatory minimum sentences for some nonviolent drug offenses and reducing the life sentence for some drug offenders with three convictions, or “three strikes,” to 25 years.

Supporters say the changes would make the nation’s criminal justice system fairer, reduce overcrowding in federal prisons and save taxpayer dollars.

“It is an opportunity to correct manifest injustices in the system,” said Texas Sen. Ted Cruz, who signed on to the legislation last week after supporters agreed to make tweaks further ensuring that violent criminals were not released early. “There are far too many young black men who find themselves incarcerated for years or even decades based on nonviolent drug offenses.”

Republican Sen. Rand Paul of Kentucky, another supporter, said he thinks the legislation became “a more consensus product” after Cruz’s tweaks were accepted and he announced his support.

“We’re going to have a lot of people on board,” Paul said. “And it’s the right thing to do.”

Most Democrats were also supportive, despite having wanted even broader changes. New Jersey Sen. Cory Booker, a leading proponent of the bill, said if the legislation is passed, it will have “a profound effect on thousands of families who have been suffering as a result of this broken system.” He estimated that 90 percent of the beneficiaries of the bill would be African American.

Booker said the bill isn’t “all the way there” in terms of what he would have liked, but it would “take a step in the right direction and correct the ills of the last 25, 30 years.”

The bill has been a priority for Trump’s son-in-law, Jared Kushner, who has worked behind the scenes with supportive Republican senators over the last two years and pushed Trump to support it. It was also a top issue for former President Barack Obama, who had hoped to see the bill become law before he left office.

Supporters have long said that the bill would pass if McConnell would just put it on the floor. But McConnell hesitated as some vocal members of his caucus said the bill would allow the release of violent felons — a charge GOP supporters denied.

McConnell said he was moving the bill as soon as this week “at the request of the president” and following improvements to the legislation. The revised bill makes some changes requested by Cruz, other Senate Republicans and law enforcement groups who had concerns it would be too soft.

The Senate’s most vocal opponent, Arkansas Sen. Tom Cotton, said the revised legislation “still has major problems and allows early release for many categories of serious, violent criminals.” Cotton said he will introduce amendments to the legislation on the floor, suggesting he could delay its passage as senators try to wrap up before Christmas.

While senators have been pressuring McConnell to take up the bill for years, the pressure ramped up in recent weeks as the session neared an end and supporters were concerned that a Democratic House would want to rewrite the bill. Kushner spoke with senators regularly — daily, in some cases — and appeared on Fox News Channel’s “Hannity” on Monday night, urging McConnell to take up the legislation. He said the legislation was “very close” and expressed optimism it would pass.

Trump said Tuesday that the bill has “great” support and was “going to be passing, hopefully.” Last week, he and Grassley teamed up on Twitter to push for a vote.

“Hopefully Mitch McConnell will ask for a VOTE on Criminal Justice Reform,” Trump tweeted. “It is extremely popular and has strong bipartisan support. It will also help a lot of people, save taxpayer dollars, and keep our communities safe. Go for it Mitch!”

Grassley responded minutes later, tweeting that he and the president had spoken about “the growing support” for the legislation.

“Pres Trump told me he wants it done THIS CONGRESS,” Grassley wrote.

Supporters who have been pushing the bill for years — including many law enforcement organizations, liberal advocacy groups and major GOP donors — were elated at McConnell’s announcement.

“It’s an incredibly groundbreaking moment and it’s really emotional for the broad coalition who has worked so hard on this legislation for so many years,” said Holly Harris, executive director of the advocacy group Justice Action Network. “I never doubted the leader would be on the right side of history on this bill.”

___

Associated Press writers Lisa Mascaro, Padmananda Rama and Jill Colvin contributed to this report.