WASHINGTON—A former U.S. Air Force special agent gave highly classified information to Tehran and helped hackers mount campaigns against U.S. spies after defecting to Iran, according to an indictment unsealed Wednesday.

Monica Elfriede Witt, who left the Air Force in 2008 and a job with a defense contractor two years later, showed persistence in trying to betray her country, prosecutors said.

Suspected...