SEOUL (Reuters) - A top confidant of South Korea’s President Moon Jae-in was jailed for two years on Wednesday under a computer crime law for posting fake “likes” on online posts favorable to Moon during his election campaign.

South Korean President Moon Jae-in holds his New Year press conference at the presidential Blue House in Seoul on January 10, 2019. Jung Yeon-je/Pool via REUTERS

The sentence for Kim Kyung-soo, touted by some as a possible future presidential candidate, deals another blow to Moon, who faces plunging ratings, economic woes and accusations of corruption against some aides and political allies.

The prosecution said Kim, with the help of a political blogger, used automatic clicking software to boost “likes” on various postings and thereby interfere in the 2017 presidential election, which Moon won.

“Kim received substantial help in driving public opinion the way he wanted,” the YTN broadcaster quoted the judge, Sung Chang-ho, as telling the court.

Kim denied the charge and said he would “fight to the end”, shortly after the judge handed down the verdict, YTN reported.

In a statement read to reporters by his lawyer, Oh Young-joong, Kim said the verdict was “unacceptable” because it was based on “proofless claims” and a “false confession” by the political blogger.

Kim did not say if he would appeal but vowed to launch “another long battle for the truth.”

The blogger, Kim Dong-won, better known as his pen name “Druking,” was jailed for three and a half years on a similar charge in a separate trial earlier on Wednesday.

Kim Kyung-soo is governor of South Gyeongsang Province and will lose that post if a higher court upholds the sentence.

Moon’s spokesman said in a statement the sentence was “never expected” and his office would follow developments until the final decision “in a calm manner”.

Moon’s party expressed regret, accusing the court of making a mistake and jailing an innocent person.

The party is looking ahead to parliamentary elections next year when it hopes to regain a majority in parliament.

Moon recently replaced his chief of staff and other top aides in a bid to revitalize momentum for his presidency.

South Koran presidents are limited to a single term but Moon will be keen to see his party’s candidate win in the next election, due in 2022.