Sri Lanka's former army chief Sarath Fonseka waves from a car after leaving the magistrate's court in Colombo, Sri Lanka, in May 2010. ((Reuters))

A military court has convicted former Sri Lankan army chief and presidential candidate Gen. Sarath Fonseka of involvement in politics while in service and stripped him of his rank and military honours.

The media office of the presidency said Friday Fonseka's sentence of a dishonourable discharge is subject to approval by President Mahinda Rajapaksa.

Fonseka led Sri Lanka's army in its victory last year against ethnic Tamil rebels, ending a quarter-century civil war. He then ran unsuccessfully for the presidency against Rajapaksa and was subsequently arrested and put on military trial.

His supporters accuse Rajapaksa of harassing Fonseka for daring to challenge him.

Fonseka's lawyer Rienzie Arsecularatne said the case has been heard in his absence during a court vacation.

"I had informed the court martial that I will not be attending during the court vacation but they went ahead and fixed the court martial on the days I was not available," he said.

The ruling had not been communicated to him, he added.

Fonseka also faces a second court martial on alleged corrupt deals while in the army.