PHILADELPHIA (Reuters) - Two judges pleaded guilty on Thursday to accepting more than $2.6 million from a private youth detention center in Pennsylvania in return for giving hundreds of youths and teenagers long sentences.

Judges Mark Ciavarella and Michael Conahan of the Court of Common Pleas in Luzerne County, Pennsylvania, entered plea agreements in federal court in Scranton admitting that they took payoffs from PA Childcare and a sister company, Western PA Childcare, between 2003 and 2006.

“Your statement that I have disgraced my judgeship is true,” Ciavarella wrote in a letter to the court. “My actions have destroyed everything I worked to accomplish and I have only myself to blame.”

Conahan, who along with Ciavarella faces up to seven years in prison, did not make any comment on the case.

When someone is sent to a detention center, the company running the facility receives money from the county government to defray the cost of incarceration. So as more children were sentenced to the detention center, PA Childcare and Western PA Childcare received more money from the government, prosecutors said.

Teenagers who came before Ciavarella in juvenile court often were sentenced to detention centers for minor offenses that would typically have been classified as misdemeanors, according to the Juvenile Law Center, a Philadelphia nonprofit group.

One 17-year-old boy was sentenced to three months’ detention for being in the company of another minor caught shoplifting.

Others were given similar sentences for “simple assault” resulting from a schoolyard scuffle that would normally draw a warning, a spokeswoman for the Juvenile Law Center said.

The Constitution guarantees the right to legal representation in U.S. courts. But many of the juveniles appeared before Ciavarella without an attorney because they were told by the probation service that their minor offenses didn’t require one.

Marsha Levick, chief counsel for the Juvenile Law Center, estimated that of approximately 5,000 juveniles who came before Ciavarella from 2003 and 2006, between 1,000 and 2,000 received excessively harsh detention sentences. She said the center will sue the judges, PA Childcare and Western PA Childcare for financial compensation for their victims.

“That judges would allow their greed to trump the rights of defendants is just obscene,” Levick said.

The judges attempted to hide their income from the scheme by creating false records and routing payments through intermediaries, prosecutors said.

The Pennsylvania Supreme Court removed Ciavarella and Conahan from their duties after federal prosecutors filed charges on January 26. The court has also appointed a judge to review all the cases involved.