Former Taiwanese President Ma Ying-jeou has been sentenced to four months in prison on charges of leaking classified information, in a case that underscores differences between pro-China and pro-independence forces on the self-governing island.

The case relates to testimony allegedly disclosed to Ma illegally in 2013 when he was president and facing challenges from opponents in the legislature. China embraced Ma's pro-China government, but has shunned that of his independence-leaning successor, Tsai Ing-wen, head of the Democratic Progressive Party.

Ma had originally been found not guilty of the charges last August, but prosecutors appealed the verdict.

The charges against Ma arose from a 2013 lawsuit brought by Democratic Progressive Party lawmaker Ker Chien-ming, who accused the ex-president of leaking information from a wiretapped conversation.