Ma Ying-jeou found guilty of leaking information on opposition politician when he was in office in 2013.

Ma Ying-jeou, a former Taiwanese president, has been sentenced to four months in jail after being found guilty of leaking classified information when he was in office in 2013, according to Taiwan News website.

The country’s high court said on Tuesday that Ma is liable for damaging the “character and rights” of Taiwanese opposition lawyer Ker Chien-ming when he leaked confidential information on him.

It said that Ma, 67, violated the Communication Security and Surveillance Act.

The decision overturned a Taipei district court ruling in August that cleared Ma of wrongdoing.

Ma could still avoid jail time by appealing the sentence or paying a fine of 120,000 Taiwanese dollars (equivalent to $4,000).

In a statement released by his office following the verdict, Ma said he would appeal the sentence.

{articleGUID}

The charges against Ma stemmed from a 2013 lawsuit brought by Ker, who sought charges against the then-president of leaking information taken from a tapped conversation in which Wang Jin-pyng, a powerful Nationalist Party legislator, pressed judicial officials to acquit Ker in a separate case.

Ma accused Wang of pressuring prosecutors not to appeal against the acquittal of Ker, who sought charges against the ex-president of leaking confidential information.

Ma served as the 18th president of Taiwan from 2008 to 2016 and became Taiwan’s third consecutive president to face criminal charges after his presidency.

During his tenure, he focused on improving relations with China.

When he stepped down from his position in 2016, he was very unpopular after eight years of poor economic performance, scandals and accusations of selling out to China, New York Times reported.