PHILADELPHIA - An attorney for kids-for-cash judge Mark A. Ciavarella Jr. told a three-judge panel from the U.S. Third Circuit Court of Appeals Wednesday that the former Luzerne County judge deserves a new trial because of anti-defense bias by the federal judge who presided over his racketeering trial.

Ciavarella was found guilty of placing juveniles in two for-profit detention centers as part of conspiracy that earned him and another judge $2.8 million in kickbacks.

He is seeking a new trial based largely on arguments that the judge in his 2011 trial, U.S. District Judge Edwin M. Kosik, made statements prejudicial to the defense in the news media and in written responses to outraged letters from the public about the high-profile case.

In oral arguments Wednesday, defense attorney Al Flora Jr. noted that Kosik wrote he was in "complete sympathy" with one of the letter writers who was critical of Ciavarella.

Flora said he was encouraged by the questions asked by the three judges on the panel during the one-hour session, which also featured argument from Assistant U.S. Attorney Gordon Zubrod, the lead prosecutor in Ciavarella's case.

"It really centered on the role of the trial judge and how the Code of Judicial Ethics comes into play - what a judge can say and what a judge can't say," Flora said. "But sometimes you can't gauge how judges are going to rule by the questions they ask."

During arguments Wednesday, Third Circuit Judge Marjorie Rendell said the case is "very tough" because it involves "judges judging judges who are judging judges."

"There's no doubt that he should not have done what he did," Rendell said of Kosik. "(But) we have to look at the overall context and see if injustice occurred here."

Ciavarella, who is serving 28 years in a federal prison in Illinois, did not attend Wednesday's court session. Flora said he spoke to him by phone Tuesday.

"He's obviously very concerned because a lot is riding on this," Flora said. "When you get into appeals court, you never know what's going to happen. Having been a judge, he knows that better than the average person."

Prosecutors have maintained that Ciavarella's claims of bias on the part of Kosik are "overstated" and that Kosik denied making statements about the case that were published in The Citizens' Voice.

Zubrod told the panel Wednesday that Kosik gave Ciavarella less prison time than called for under federal sentencing guidelines, which could have justified a life sentence.

The state Supreme Court vacated Ciavarella's rulings in thousands of juvenile court cases, finding he denied juveniles the right to counsel, incarcerated them on minor charges and pressured juvenile probation officials to recommend incarceration over other penalties.

Ciavarella, 62, is seeking a new trial or resentencing on eight of the 12 counts on which he was convicted. He is not disputing his conviction on four tax counts, which account for three years of his prison term.

Ciavarella admitted on the stand at his trial that he did not pay taxes on his share of $2.1 million paid to him and former Luzerne County judge Michael T. Conahan by wealthy developer Robert K. Mericle, whose company built the juvenile detention centers. Ciavarella maintained he believed the Mericle payments were legitimate "finder's fees" for referring Mericle to the companies that hired him to build the centers.

Ciavarella testified he was unaware a former co-owner of the detention centers, Robert J. Powell, paid Conahan $770,000 and he believed any payments made by Powell were rent payments on a Florida condominium the judges owned through a company registered under their wives' names.

Conahan, who pleaded guilty to racketeering conspiracy, is serving a 17½-year sentence. Powell, who testified against Ciavarella, is serving an 18-month sentence. Mericle, who was also a prosecution witness, is awaiting sentencing on a charge of failing to report a felony.