BY ALL accounts, Derrick Cain is a good son, husband and father who worked as a pipe fitter.

But in 2001, a friend who sold cocaine told Cain he would pay him if he stored the coke at his house. Cain needed the extra cash so he could help put his wife through nursing school.

Then, in 2005 - just weeks after Lakeesha Cain graduated - cops raided Cain's home and found more than a kilo of coke and a loaded, semiautomatic handgun.

It was Cain's first brush with the criminal-justice system, and despite his being a family man with a good job, his pleading guilty to the charges and his legal ownership of the gun, the judge's hands were tied at Cain's March 2009 sentencing.

"There's nothing anyone here can do or say to get you below 10 years," U.S. District Judge Legrome Davis said, referring to the mandatory-minimum sentences for the drug offense and related gun charge.

For Cain, 34, the maximum-security prison in Lewisburg, 170 miles northwest of Philadelphia, is now his home. His wife, who was also his high-school sweetheart, says he spends his time working out, chatting up other cons about the stock market and reading tomes on self-motivation. He won't be released until December 2017.

To Families Against Mandatory Minimums (FAMM), an organization that advocates for fair-sentencing laws, Cain is also a "profile of injustice" and the victim of a misguided law passed in 1986 that created mandatory-minimum sentences for federal drug offenders.

In the 25 years since then, the law's been great for federal prosecutors, but not so great for judges and folks like Derrick Cain.

Federal prosecutors here admit privately that mandatory-minimum-sentencing laws can be "draconian," but they have also said that without such laws, it would probably be more difficult to encourage lower-level drug offenders to testify against kingpins and major traffickers.

And that, they say, has helped to remove at least some of the scourge of drugs and violence from communities.

But opponents say the laws usurp judicial power, lead to higher prison costs and are not applied evenly.

"I don't think [Derrick] deserves as much time as he got," said Lakeesha Cain, a pediatric nurse at Children's Hospital of Philadelphia. "He never had any problems with the law before, he had a job, the gun was legally registered and had been in our home for years."

A mandatory-minimum sentence is a required term of punishment - typically incarceration, for five to 20 years or more - that is established by Congress or a state legislature. (There are also federal mandatory minimums for certain gun, child-sex and aggravated-identity-theft offenses.)

A report by the U.S. Sentencing Commission in 1991 criticized the transfer of power in courts from judges - who are supposed to be impartial - to prosecutors, who are not.

And some prosecutors think that is not necessarily a bad thing.

"The sentence you get shouldn't be based on which way you turn when you get off the elevator," said Assistant U.S. Attorney Robert Zauzmer, referring to elevators at the federal courthouse in Center City that lead to judges' courtrooms.

A survey by the commission last year of 639 federal judges found that 62 percent of them believe that mandatory-minimum sentences are too high. Further, 69 percent believe that the "safety valve" law - which was passed in 1994 and reduces mandatory-minimum sentences for first-time, nonviolent drug offenders - should be expanded for all offenses with a mandatory minimum.

"Congress thought mandatory-minimum-sentencing laws would solve the drug problem, but instead they have packed federal prisons with drug offenders who are not the kingpins they intended to catch," said Julie Stewart, president of FAMM.

For example, a 1988 federal law made everyone in a drug-trafficking conspiracy liable for every act of the conspiracy. That meant a courier in a large cocaine operation could face the same mandatory-minimum 10-year sentence as the kingpin.

FAMM and others also say mandatory-minimum-sentencing laws have usurped judicial discretion and dictated one-size-fits-all prison terms, regardless of the circumstances of the case.

"Sentencing is meant to be about the person, and the process should be unique to all defendants," says federal criminal-defense attorney NiaLena Caravasos. "The requirement of mandatory sentences ties the hands of judges . . . and results in defendants being warehoused for decades."

Since the 1986 passage of the drug-conviction minimums, the federal prison population has exploded and the Bureau of Prisons' budget has increased 534 percent, to $6.3 billion this year. (More than half of all federal prisoners today are drug offenders.)

Over the years, there have been few changes to ameliorate the effects of such sentences, but that is beginning to change.

Last summer, Congress eliminated the five-year mandatory minimum for simple possession of crack and reduced the disparity between criminal penalties for dealing in powder and crack cocaine. The Congressional Budget Office estimated that the new law will reduce the prison population by the thousands and save taxpayers $42 million in the first five years.

In the past, tough-on-crime conservatives would have scoffed at such rationales for reducing criminal penalties or eliminating mandatory-minimum sentences.

But against a backdrop of attempts to reduce the nation's mounting debt, conservatives spoke out at a Capitol Hill hearing last month in favor of finding less-expensive ways to control crime and rehabilitate federal offenders, perhaps signaling the possibility of further change coming to the 25-year-old law.