Former Pennsylvania attorney general Kathleen Kane is escorted from the Montgomery County courthouse for her sentencing hearing in Norristown, Pa. (Matt Rourke/AP)

Former Attorney General Kathleen Kane was sentenced Monday to 10 to 23 months in jail for illegally disclosing details from a grand jury investigation to embarrass a rival and lying about it under oath.

Kane was also sentenced to eight years of probation by a judge in Montgomery County, Pa., who said Kane’s ego drove her to take down enemies and break the law. She resigned in August after her conviction on two felony counts of perjury and seven misdemeanor charges.

Judge Wendy Demchick-Alloy said Kane assumed an “off with your heads” mentality as she ran the state’s top law enforcement agency. The judge called Kane a political “neophyte” who failed to make the transition from campaigner to public servant.

“This case is about ego — the ego of a politician consumed with her image from Day One,” Demchick-Alloy said. “This case is about retaliation and revenge against perceived enemies who this defendant . . . felt had embarrassed her in the press.”

Kane, the first woman and first Democrat elected as the state’s top prosecutor, was handcuffed in court and led out a side door. She will remain in custody until she posts $75,000 cash bail.

She had been a stay-at-home mother and was a former assistant county prosecutor when she used her husband’s trucking fortune to run for statewide office in 2012. She quickly became a rising star in the state Democratic Party before her office devolved into turmoil.

Kane and her husband are estranged and share custody of their teenage boys.

“Your children are the ultimate . . . collateral damages. They are casualties of your actions,” the judge said. “But you did that, not this court.”

Earlier Monday, Kane’s 15-year-old son pleaded for leniency while her former deputies described an office demoralized by her leadership and terrorized by “Nixonian espionage.”

Kane, 50, had argued that the loss of her career, law license and reputation was punishment enough. “There is no more torture in the world than to watch your children suffer and know you had something to do with it,” she said during the hearing.

Aside from the conviction, Kane’s political career will be remembered for her investigation of pornography that she said was being traded on state computers by judges, lawyers and other public employees. Two state Supreme Court justices resigned amid the fallout.