Former Pennsylvania Attorney General Kathleen Kane moved a big step closer to serving her jail term Friday with a ruling by the state Superior Court affirming her conviction for perjury and leaking grand jury information to hurt a rival.

Kane, 51, the first woman and first Democrat to be elected state attorney general, was convicted by a jury nearly two years ago, but the judge in the case said she did not have to serve her 10- to 23-month sentence in the Montgomery County prison until her state appeals were over.

Like all defendants in criminal cases in Pennsylvania, Kane, who lives in the Scranton area, had an automatic right to one appeal — to have her conviction reviewed by a three-judge panel of the state Superior Court. Her next option would be to ask for a group of nine Superior Court judges to reconsider the case.

If such a hearing is not granted, Kane then could ask the state Supreme Court to take up her case, although it is not legally required to. If it turns away her appeal, or hears it but rules against Kane, she then would be jailed.

>> READ MORE: Jury: A.G. Kane guilty of perjury, obstruction, all other charges

Former state Chief Justice Ronald Castille, in an interview Friday, said there was no guarantee that the high court would take up an appeal, although he said the current court seemed to enjoy considering high-profile cases.

Even if Kane is denied hearings by both the full Superior Court and the state high court, the process could take eight months or more to play out.

In its unanimous 23-page opinion, the three-judge Superior Court panel made quick work of one of Kane's arguments — that the special prosecutor who first built the case against her lacked legal legitimacy. The panel noted that the state Supreme Court had rebuffed Kane on that score even before her conviction.

The panel also rejected Kane's claim that she should have been permitted to bring up a pornography scandal in her office as part of her defense. The judges said that Montgomery County Court Judge Wendy Demchick, who presided over Kane's 2016 trial, was right to block that as irrelevant.

Kane was accused of leaking grand jury material in a vendetta against former prosecutors in her office. In a complex argument, she said she wanted to tell jurors that she was aware that those prosecutors had received pornographic emails on the job but that she had not used that knowledge against them. This restraint, she said, showed she had not been engaging in a vendetta. But Demchick said mentioning porn would have pointlessly and unfairly inflamed the jury.

The Superior Court panel consisted of a Democrat, Anne E. Lazarus, who wrote the opinion, and two Republicans, William Platt and Paula F. Ott.

The path to Kane's conviction was convoluted. It began when the Inquirer disclosed in 2014 that Kane had secretly ended a bribery investigation involving state legislators from Philadelphia.

>> READ MORE: Kane shut down sting that snared Phila. officials

To retaliate against a former state prosecutor whom she blamed for the story, Kane leaked secret grand jury information that she thought would embarrass the prosecutor.

The plot backfired. The judge who presided over the grand jury appointed a special prosecutor, Thomas Carluccio, to investigate the leak. He blamed it on Kane and accused her of lying about her actions. Building on the work of the special prosecutor, county prosecutors in Montgomery County — where the grand jury had been based — brought the criminal case against Kane.

If Kane should fail in all her appeals, she would join about 350 other female prisoners in the county prison in Eagleville.