In the Scranton area, Ciavarella was a key target among many in a sweeping and still-ongoing federal corruption probe. Prosecutors have brought charges against nearly 30 officials, including two other judges, numerous court officials, a former state senator, school board members, and county officials.
Ciavarella, mild-appearing with metal-frame glasses and thinning hair, showed no emotion as his punishment was announced. He chose to begin serving his time immediately, not requesting the grace period of several weeks or months that many defendants seek before reporting for imprisonment.
His lawyers pledged to appeal his sentence, saying they might argue it violates the Constitution's ban on "cruel and unusual" punishment. Even with time off for good behavior, Ciavarella is likely looking at a quarter-century in prison.
The no-nonsense and sometimes prickly Kosik, 86, had been expected to write a tough finish to the Ciavarella story.
Two years ago, he rejected a guilty-plea deal that prosecutors struck with Ciavarella and his chief coconspirator, another former judge, that had called for each to serve only about seven years in prison. Kosik ripped up that agreement after he decided the two former judges were not remorseful enough.
Even after agreeing to plead guilty, Ciavarella, in particular, continued to insist that there had been no quid pro for the money he received - a theme he hit after he was found guilty in February, and his main message Thursday at his sentencing.
As the longtime top Juvenile Court judge in Luzerne County, which includes Wilkes-Barre and Hazleton, Ciavarella joined with the county president judge, Michael T. Conahan, to engineer what experts have called the worst juvenile-justice scandal in the nation's history.
At Ciavarella's trial, Zubrod and his team of fellow prosecutors and FBI agents showed how he and Conahan used their judicial clout and political power to shut Luzerne County's government-run juvenile facility a decade ago. That created a business opportunity for a politically connected developer, Robert Powell, and a builder, Robert Mericle.
After Mericle built a pair of for-profit juvenile centers that were partly owned by Powell, the judges made sure the places were kept full of youthful detainees.
Juvenile-justice advocates, in criticism later affirmed by a state Supreme Court investigatory panel, said Ciavarella ran a kangaroo court for teens and children, shipping them to the for-profit facility with no regard for basic fairness - and quite often without benefit of a defense lawyer.
And over the years, prosecutors said, Mericle and Powell paid $2.9 million to the judges, sometimes in cash stuffed into FedEx boxes or circuitously routed checks. Prosecutors said both men hid the money, keeping it off their tax and financial-disclosure forms.
After Kosik in 2009 killed the plea deals with Conahan and Ciavarella, Conahan struck a new bargain with prosecutors - he pleaded guilty but left his sentence solely up to Kosik. Conahan does not yet have a sentencing date.
Mericle and Powell have also pleaded guilty and are awaiting sentencing.
In all, up to 4,000 youngsters may have been railroaded inside Ciavarella's courtroom, the state Supreme Court has determined. It set aside their convictions.
At Thursday's sentencing hearing, every seat was filled in Kosik's fourth-floor courtroom, and other spectators watched on video in a backup courtroom.
There was an especially large contingent of family and friends of a man who committed suicide at 23, six years after being sent away by Ciavarella. Many wore white T-shirts emblazoned with "How much is your child worth????"
Ciavarella's defense team had filed papers asking the judge to show leniency because, they said, as a former judge, Ciavarella faces the risk of abuse by fellow inmates.
In his 15-minute address to Kosik, Ciavarella said he wanted to apologize to his family, to Luzerne County's citizens, and to the county legal community.
"To the victims," he added, "I also apologize to them and ask that they forgive me for being a hypocrite and not practicing what I preached."
But a defiant Ciavarella then pivoted into a much more extensive defense of his conduct, laced with attacks on the prosecutors and Powell, who was a key prosecution witness.
Powell, he said, was "a liar and self-centered individual who would do anything and say anything to protect himself."
As for the prosecutors, Ciavarella said, they had unfairly hung the "kids for cash" label on him without proving it at trial.
"Those three words made me the personification of evil," Ciavarella said. "They made me the anti-Christ and the devil."
He denied taking any money from Powell - at his trial, the jury cleared him of those charges. But he did not dispute that he took almost $1 million from Mericle, the builder. During the trial, he argued that the money was a legitimate "finder's fee" paid to recompense him for hooking up the jails' builder with a developer. The jury rejected that. At his sentencing, he said, "I should not have taken this money even if it was legal, because it was wrong and unethical for me to do, especially in my capacity as Juvenile Court judge."
Still, he said, "there was no connection between the money I received and the children I placed."
Under skeptical questioning from the white-haired Kosik, Ciavarella also said, "I never violated any child's rights. I didn't do anything different than any other judge in this area."
Prosecutor Zubrod, in his arguments to Kosik, said that under sentencing guidelines, Ciavarella should be given a maximum sentence - life behind bars.
He described Ciavarella as a callous judge who routinely "verbally abused and cruelly mocked children."
In one case, Zubrod said, Ciavarella jailed an 11-year-boy after his family failed to pay a $488 fine.
"Put the handcuffs on him. Take him out of here," Ciavarella said from the bench, according to Zubrod. "We're having a good day."
Later in Thursday's hearing, William Ruzzo, one of Ciavarella's defense lawyers, said the boy in question was released after only a few hours.
Zubrod also said Ciavarella's misdeeds had left a county "criminal justice system that is in ruins and will not recover in our lifetimes."
In remarks later to reporters, U.S. Attorney Peter Smith, the top federal prosecutor for the Northeast Pennsylvania region, said Ciavarella and his lawyers had engaged in a "hairsplitting game" to justify his conduct.
While the government never sought to tie a specific payment to a specific child's fate, Zubrod said, the conspiracy was plain.
"Their clear understanding was that if you don't keep paying us, you don't get any kids," the veteran prosecutor said.
Regarding the sentence, Zubrod added: "Full justice was done."
By any measure, it was a stern sentence. In the Philadelphia region, one federal judge drew attention as a heavy sentencer when he imposed a 10-year term on former City Treasurer Corey Kemp, and another judge drew criticism when he imposed only 55 months on former State Sen. Vincent J. Fumo.
Nationally, the previous record for a corruption sentence appears to be the 2006 prison term of 16 years given a California mayor convicted of rigging contracts.
Jessica Thorston, 23, was among those punished by Ciavarella in years past who appeared for his sentencing.
According to Thorston, Ciavarella jailed her in one of the for-profit centers when she was a young teen. She said she had been picked up by police when an older sister was shoplifting.
At her brief hearing at the time, Thorston said, her mother burst into tears, prompting an angry response from Ciavarella.
"He wouldn't let her speak," Thorston said. "He told her to shut up or he would lock her up, too."
Of the 28-year term imposed on Ciavarella, Thorston said, "I thought it was good, real good."
Contact staff writer Craig R. McCoy at 215-854-4821 or firstname.lastname@example.org.