A federal judge reluctantly handed down what she called an "extremely severe and harsh" life sentence without parole Tuesday to a 47-year-old heroin dealer convicted of trafficking the drug from New York to Baltimore.

District Judge Catherine C. Blake said she had no choice but to accept the prosecutors' decision to seek the mandatory term, based on Roy Clay's prior convictions and the amount of drugs involved.

U.S. Attorney General Eric H. Holder Jr. has said his agency will seek to avoid mandatory minimum sentences for some drug offenders. But federal prosecutors in Maryland said that shift applies to the way new cases are charged, and that in Clay's case, the mandatory sentence was appropriate.

Assistant U.S. Attorney Ayn Ducao described Clay as a "classic drug-dealing recidivist."

Clay's attorney, Edward Smith Jr., said the government had decided to go "full steam ahead" with a sentence that "seems to cut against the public policy set forth by the attorney general."

Blake did not express an opinion on Holder's policy. But she said she disagreed with the "ultimate outcome" in Clay's case.

"Were I exercising complete discretion ... I would impose a sentence of ... 30 years," Blake said. "This is a decision the executive branch gets to make."

Clay imported large quantities of heroin from contacts in New York between 2009 and 2011, according to evidence at his trial summarized by prosecutors.

In the winter of 2011, Clay was the victim of a home invasion. FBI agents watched as the robbers chased Clay and another man from his home.

"This is clearly what he's spent his life doing," Ducao said. "This is not a crime of need. ... It's a crime of a man who wanted to continue living this lifestyle."

Clay told the judge that he understood that he needed to be held accountable for his crimes. But he rejected the allegation that he was a leader of the trafficking group.

"The way the record reads it might seem I'm a bad person," Clay added. "I'm really not a bad person."

Clay apologized to his mother, who was sitting in the courtroom. He said he has a 4-year-old daughter who does not understand his incarceration and whose mother had many relatives killed in violent incidents.

"I just want to get home to my family," Clay said.

Clay was convicted in 1993 on a federal heroin charge and in 2004 on a state charge of possession of drugs with intent to distribute. Under federal sentencing rules, defendants who have dealt more than 1 kilogram of heroin and have two prior convictions face a mandatory life sentence.

Holder told the American Bar Association this month that he had instructed prosecutors to avoid charging "low-level, nonviolent drug offenders who have no ties to large-scale organizations" with offenses that could lead to them receiving mandatory sentences.

But Maryland prosecutors said that characterization did not apply to Clay. They said the assault convictions and arrests on Clay's record show he is a "career offender."

Federal agents say they overheard Clay on a tapped phone discussing a plot to buy gold coins using fraudulent credit card details. That formed the basis for separate bank fraud and identity theft charges, but those were dropped Tuesday.

Clay's attorney had challenged the validity of the state drug conviction. Blake ruled that it was fair. Smith said after the hearing that he would return to state court to fight his client's case.

If the 2004 guilty plea in Baltimore Circuit Court were ruled to be faulty, Clay could be resentenced, Smith said.