SEOUL, South Korea (AP) — South Korea’s former spy chief was indicted on charges of meddling in last year’s presidential elections by ordering an online smear campaign against opposition candidates, prosecutors said Friday.

Won Sei-hoon ordered his agents to post comments slandering liberal candidates and praising conservative Park Geun-hye, the Seoul Central District Prosecutors’ Office said in a statement. Park won the December vote by a million votes and took office in February.

The indictment adds to troubles for the spy agency criticized in recent years for failing to have timely intelligence about North Korea.

Won resigned as National Intelligence Service chief in March after serving four years under conservative President Lee Myung-bak.

NIS agents also tried to portray opposition candidate Moon Jae-in as too soft on North Korea and unqualified to protect South Korea against North Korean threats, prosecutors said.

NIS said it plans to issue its response later.

Under agency regulations, Won would face up to five years’ imprisonment if found guilty. The opposition party threatened this week to impeach the justice minister over the scandal.

It is not clear if or how the effort affected the elections.