The Supreme Court hears arguments on whether a prisoner can be given a longer sentence in order to undergo rehabilitation. A woman caught smuggling immigrants into California awaits the outcome.

Reporting from Washington — Alejandra Tapia expected to go to prison as punishment for her crimes. But she didn't expect to be there longer so she could undergo drug rehabilitation.

The U.S. Supreme Court took up her case Monday to decide whether federal judges can sentence prisoners to more time behind bars if it's deemed to be for their own good. The outcome could have a broad effect because more than 80,000 convicted criminals are sentenced each year, and the lower federal courts are split over whether judges can consider "rehabilitation" when setting a prison term.

Tapia's case put a spotlight on the history of sentencing policy in America and the personal history of a troubled young woman. She was arrested at San Ysidro, Calif., in 2008 when border agents found two illegal immigrants hidden in the converted gas tank of her Jeep. She was charged with the attempted smuggling of immigrants. When she did not appear for a court hearing she was arrested again, and agents found methamphetamine in her apartment.

Tapia was convicted on all counts, but because she had been sexually abused as a child, her lawyer asked for leniency from the court. However, current law ties the hands of federal judges and leaves them little freedom to set very long or very short terms.

The minimum sentence for Tapia was three years. U.S. District Judge Barry Moskowitz decided on the maximum term of 51 months, slightly more than four years, and cited her need for drug rehabilitation as a factor.

"She needs help," the judge said. She needs to be "in long enough to get the 500-hour drug program" so she can "start to make a recovery."

Before 1984, judges had wide leeway in sentencing, and inmates could be released on parole if they were seen as rehabilitated. But that year, a skeptical Congress passed the Sentencing Reform Act and said "imprisonment is not an appropriate means of promoting correction and rehabilitation." Judges were required to set prison terms based on specific factors involving the crime and parole was abolished.

A public defender in San Diego appealed the sentence Moskowitz gave Tapia and won a hearing before the high court. Congress, when it prohibited sentences for rehabilitation, had sought "to end the practice of sending defendants to prison for treatment," attorney Reuben Cahn told the justices.

Typically, the Justice Department defends the prison term won by prosecutors, but in this case, Obama administration lawyers told the court Tapia's claim was correct. The "plain terms" of federal law forbid a judge from lengthening a sentence for the purpose of rehabilitation, they said.

So, the justices asked University of Pennsylvania law professor Stephanos Bibas and his school's Supreme Court Clinic to argue in defense of the district judge's sentence. Bibas argued that Congress, by setting strict sentences and by eliminating federal parole, sought to end the "open-ended, airy hopes that everyone will be cured of criminality."

Bibas agreed a judge could not add an additional five years so that a prisoner could be rehabilitated, but argued the law did not forbid the use of practical programs that would help a prisoner. He said Tapia's sentence should be affirmed because, regardless of the reasons Moskowitz cited, it still was within the range set by law.

For their part, the justices sounded split as well. Citing the words of the law, Justice Antonin Scalia said it clearly prohibits judges from adding prison time for rehabilitation.

Justice Sonia Sotomayor, a former trial judge in New York, said the judge in this case had a "dual motive." He wanted to deter Tapia from committing future crimes, and he did so by recommending rehabilitation through drug treatment, she said.

Justice Anthony M. Kennedy appeared to agree: "Those are not mutually exclusive. You can have imprisonment and rehabilitation at the same time."

Tapia will await a ruling in a federal prison in Fort Worth. She turned down the drug treatment program. According to the U.S. Bureau of Prisons, her release date is Nov. 4, 2012.