HARRISBURG - All but one of the convictions of a former county judge in the "kids for cash" juvenile justice scandal in northeastern Pennsylvania were upheld Friday by a federal appeals court.

A three-judge panel of the U.S. Court of Appeals for the Third Circuit rejected nearly all the arguments made by attorneys for Mark A. Ciavarella Jr., who is serving a 28-year sentence for racketeering, fraud, conspiracy, and other offenses.

At the heart of the case was Ciavarella's involvement with privately run juvenile detention centers and allegations that as a judge he sent children to the centers so he could make money.

"In many cases, with the intent of increasing his personal gain, Ciavarella disregarded the recommendation of juvenile probation officers evaluating the juvenile offenders' cases and ordered their detention," Judge Julio Fuentes wrote.

The panel threw out one count of honest-services mail fraud, saying the statute of limitations had expired, and sent the case back to the district court for resentencing.

With the criminal investigation, the Pennsylvania Supreme Court threw out about 4,000 juvenile convictions in cases Ciavarella handled. In December, a federal judge approved a nearly $18 million settlement for claims from about 1,600 juveniles who said they had been wrongfully incarcerated by judges.

Ciavarella attorney Al Flora said he hoped to discuss the ruling soon with his client. He said no decision had been made about an appeal to the full Third Circuit or the U.S. Supreme Court.