A former president is going to jail for failing to maintain sealed lips.

On Tuesday, a court in Taiwan sentenced former president Ma Ying-jeou to four months jail over a leak of information related to national security, legal documents showed.

He has, however, vowed to appeal and could avoid jail altogether by paying a fine.

In the first conviction in a series of lawsuits against Ma since he left office in 2016, Taiwan’s High Court overturned a lower court’s judgment of not guilty, saying that he violated a communication and surveillance act.

“Ma Ying-jeou violated the Communication and Surveillance Act,” the court said in its judgment, adding that the punishment for the sections infringed was four months’ imprisonment.

Also Read: 5 African Leaders That Have Faced Trial

The court found that Ma had leaked information related to national security to an opposition lawmaker, Ker Chien-ming, that should have been confidential.

Ma’s sentence could, however, be avoided on payment of a fine of T$120,000 ($4,019) about 1.5 million naira, the court said in a statement, in line with Taiwan law that allows such payments for lighter sentences, instead of going to jail.

Ma told Taiwan media he planned to appeal.

A former stalwart of the opposition Nationalist or Kuomintang Party, Ma was Taiwan’s president from 2008 to 2016, ushering in an era of closer ties with mainland China.

Also Watch: 2019: Please Join The Race