The Pennsylvania Supreme Court on Thursday overturned thousands of juvenile-offender convictions handed down by a judge now charged in a corruption scandal.

The judge, Mark A. Ciavarella Jr. of the Luzerne County Court of Common Pleas, and Michael T. Conahan, a fellow judge who for a time was the chief of that court, are charged with taking more than $2.6 million in kickbacks from the owner of two privately run youth detention centers in exchange for their sending teenagers there.

The Supreme Court said the conviction of any juvenile who appeared before Judge Ciavarella after Jan. 1, 2003, was invalid. The justices barred the retrial of all but an estimated 100 of those cases.

The decision followed advice the court received from Arthur Grim, a Berks County judge whom it appointed in February to review juvenile cases involving Judges Ciavarella and Conahan.