A prosecutor filed criminal charges on Thursday against Pennsylvania’s attorney general, Kathleen G. Kane, in a convoluted tale of political maneuvering and retribution that threatens the career of an official who was seen until recently as one of her state’s rising stars.

Ms. Kane, a Democrat in her first term, has been accused of illegally giving grand jury documents to a newspaper in order to embarrass a critic, and then trying to cover up her actions with false testimony to a different grand jury. The Montgomery County district attorney, Risa V. Ferman, charged the attorney general with counts that include perjury and obstruction of justice. Ms. Ferman also filed a related charge against an aide to Ms. Kane.

“Kane devised a scheme to secretly leak confidential information and secret grand jury items directly to media,” Ms. Ferman, a Republican, said at a news conference in Norristown. And then, before a grand jury, “she lied repeatedly about her own actions, about the law and about other matters.”

Ms. Kane has admitted to leaking material, but insisted that it was not covered by grand jury secrecy requirements.