The Seoul High Court on Wednesday gave a four-year jail term to a former spy agency chief for his role in a covert operation to manipulate public sentiment in the run-up to the 2012 presidential election.

Won Sei-hoon, 66, who led the National Intelligence Agency from 2009 to 2013 under the conservative Lee Myung-bak administration, was found guilty of election and NIS law violations. He was accused of directing his agents to conduct an illicit smear campaign online to sway voters in favor of then-presidential candidate Park Geun-hye of the conservative ruling bloc.

Former intelligence agency chief Won Sei-hoon is escorted to the courtroom at the Seoul High Court to attend his sentencing hearing Wednesday, while being surrounded by reporters. (Yonhap)

“Won had colluded (with others) to spread pro-government opinions through online postings and support a specific political party and politicians, in clear violation of the NIS’ political neutrality,” the presiding judge said.

Two other former NIS officials, who were tried alongside Won, both received prison terms of 2 1/2 years, suspended for four years.

“We cannot accept the ruling. We will appeal,” Bae Ho-geun, Won’s attorney said. Won was taken into custody immediately after the ruling.

It was a retrial after the Seoul High Court’s ruling in 2015 that gave the former spy chief a three-year jail term was overturned on appeal by the Supreme Court. The top court cited a lack of evidence as the prosecution failed to prove that Won masterminded the smear campaign. The top court’s decision got Won released on bail. The new trial was ordered in July last year.

In the ruling Wednesday, the judge had left out pieces of evidence questioned by the Supreme Court, but saw other evidence, including hundreds of Twitter accounts used by NIS staff members, as convincing enough to convict Won.

Recently, the NIS’ internal inquiry and state prosecutors under the new liberal administration revealed that the agency had hired internet-savvy civilians for the covert online operation.

In the election, Park beat liberal rival Moon Jae-in by a narrow margin. Moon is now president, while Park was expelled from office in March and is now standing trial for corruption.

The new Moon administration has vowed to reform the NIS to fix past wrongdoings, while the spy agency’s new chief has pledged to end domestic political involvement.