SEOUL, South Korea — South Korea's former spy chief has been indicted on charges of meddling in last year's presidential election by ordering an online smear campaign against opposition candidates and their parties, prosecutors said Friday.

Won Sei-hoon saw opposition figures as North Korea sympathizers and instructed senior National Intelligence Service officials to prevent them from gaining support on the Internet ahead of the elections, the Seoul Central District Prosecutors' Office said in a statement.

Under his order, NIS expanded its "psychological warfare" squads and its agents posted comments criticizing liberal candidates and praising conservative Park Geun-hye, prosecutors said. NIS agents 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.

"Leftist followers of North Korea are trying to regain power by being in contact with North Korea. If we don't respond firmly this year, NIS may disappear," Won was quoted in the statement as saying in February last year.

Moon was an aide to late liberal President Roh Moo-hyun who advocated engagement with North Korea and held a summit in Pyongyang in 2007.

Park beat Moon in December by a million votes and took office in February. It is not clear if or how the effort affected the elections. She has vowed to be tough against North Korean provocations while keeping the door open for dialogue and humanitarian exchanges.

The indictment adds to troubles for the spy agency, which has been criticized in recent years for failing to have timely intelligence about North Korea. Namely, NIS failed to learn of North Korean leader Kim Jong Il's death in December 2011 until two days after it occurred, when Pyongyang's state TV announced it.

Won resigned as National Intelligence Service chief in March after serving four years under conservative President Lee Myung-bak. Prosecution officials raided NIS headquarters in Seoul in late April.

NIS wouldn't comment on the allegations, and said it will seek a fair ruling in a coming trial.

Under a law governing the agency, Won would face up to five years' imprisonment if found guilty.

The scandal flared about one week before the vote, when opposition accused an NIS officer of involvement in online campaigning in a Seoul building, based on a tip from another agent. NIS defended her as conducting a mission to deal with Pyongyang's cyberwarfare.

A few days later, police cleared her of any wrongdoing. But a police officer later accused her bosses of trying to cover up the case. On Friday, prosecutors said they have indicted a former senior police official on charges of interfering with the investigation.

The opposition party threatened this week to impeach the justice minister over the scandal.