WASHINGTON — 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 federal 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. 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 was "critical to the outcome."

"Sen. 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 would be a major bipartisan policy achievement for this Congress and the largest sentencing overhaul in decades. AshLee Strong, a spokeswoman for House Speaker Paul 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 Senate 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. The bill would affect only federal prisoners, who make up roughly 10 percent of the country's prison population. Several states have passed similar laws that apply to state prisons.

"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 to guard against violent criminals being 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."

Democratic Sen. Cory Booker of New Jersey, 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 said many of the bill's beneficiaries would be African-American.

Booker said the bill isn't "all the way there" in terms of the sentencing reforms that he and other Democrats 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 that 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 Senate's most vocal opponent, Republican Sen. Tom Cotton of Arkansas, 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.

Senate Judiciary Committee Chairman Chuck Grassley, the legislation's lead sponsor, has not yet released the text of the legislation. Louisiana Sen. John Kennedy, a Republican who has also been skeptical of the bill, said he was waiting to see it because he wants to "try to figure out how many people they are going to let go."

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 worried that Democrats taking the House majority in January 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 it up.

Trump said Tuesday that the bill has "great" support and was "going to be passing, hopefully."

"Thanks to Leader McConnell for agreeing to bring a Senate vote on Criminal Justice this week!" Trump tweeted. "These historic changes will make communities SAFER and SAVE tremendous taxpayers dollars. It brings much needed hope to many families during the Holiday Season."

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

The American Civil Liberties Union encouraged senators to vote for the legislation, saying it "makes modest but important improvements to our criminal justice system."

Holly Harris, executive director of the advocacy group Justice Action Network, said McConnell's decision is "an incredibly groundbreaking moment" and emotional for the broad coalition that has been working on it for so long.

"I never doubted the leader would be on the right side of history on this bill," Harris said.