By ERIC TUCKER

WASHINGTON — A push to overhaul criminal sentencing is prompting the early release of thousands of federal drug prisoners, including some whom prosecutors once described as threats to society, according to an Associated Press review of court records.

About 6,000 inmates are due to be freed from custody in the coming month, the result of changes made last year to guidelines that provide judges with recommended sentences for specific crimes. Federal officials say roughly 40,000 inmates could be eligible for reduced sentences in coming years.

Many of them are small-time drug dealers targeted by an approach to drug enforcement now condemned by many as overly harsh and expensive. But an AP analysis of nearly 100 court cases also identified defendants who carried semi-automatic weapons, had past convictions for robbery and other crimes, moved cocaine shipments across states, and participated in international heroin smuggling.

Supporters of lighter drug sentences say there’s no evidence that longer punishment protects public safety. Studies show that inmates released early aren’t more likely to reoffend than those who serve their entire sentences.

Still, the broad spectrum of defendants granted early release – including some about whom prosecutors not long ago raised dire warnings – underscores the complex decisions confronting the government as it pursues an overhaul of drug sentencing.

“I’m a career prosecutor. I’m a law-and-order girl, and I believe that you need to send dangerous people to prison for a very long time,” said Deputy Attorney General Sally Yates. “But I think that we need to be smart about deciding who are those dangerous people.”

Willie Best, a one-time District of Columbia drug dealer whose sentence was already slashed under past crack guideline changes, had an additional month taken off and is due out in 2016.

Prosecutors in 2008 said Best helped run a drug-dealing organization, shot at someone he believed had stolen from him and, after fleeing as warrants were served, was found in a stolen car with an assault rifle and other guns. His lawyer described him as the product of a troubled, impoverished upbringing. And Best, in an interview from prison, called himself a loving father who bears no resemblance to his past self.

“It’s been a long time coming. Eight years is a long time,” he said. “I came in one way. I’m coming out another.”

Guidelines set by the U.S. Sentencing Commission offer recommended minimum and maximum terms for federal crimes. The independent commission voted last year to reduce ranges for drug offenses, then applied those changes to already-imprisoned convicts.