COLOMBO (AFP) - A court martial convicted Sri Lankas former army chief Sarath Fonseka Friday of dabbling in politics and stripped him of his rank and medals, a senior military source said. The guilty verdict was read out to General Fonseka at the court martial a short while ago, the military source told AFP. The president as commander-in-chief must now ratify the decision. Fonsekas hearing before the three-member tribunal began five months ago. He has the right to appeal the verdict to a civilian court. The court has ruled that he should be cashiered, the military source said. So he will be stripped of his rank and all the medals he had earned during his 40-year career. A separate court martial is still hearing charges that he engaged in corrupt deals. As the battlefield architect of the military victory over Tamil Tiger rebels in May last year, Fonseka had seemingly secured his legacy as the commander who crushed the 37-year insurgency for an independent Tamil homeland. But it was his bid to translate that success into political power that was to prove his undoing as he took on his former ally, President Mahinda Rajapakse, at the ballot box in elections in January. The two men fell out soon after the defeat of the Tigers and both sought to take credit for the victory in what became an extremely acrimonious, and at times violent, battle for the presidency. It was a showdown that Rajapakse eventually won with ease, routing his challenger who, as a relative political novice, was left isolated and vulnerable. Two weeks after the election he was arrested and brought before a court martial. Despite being in military custody, he managed to win a seat in parliament in April. He was briefly released for parliaments opening on April 22 and vowed he would use the floor of the House to campaign for freedom and democracy. Fonsekas arrest and detention drew angry protests at the time, but have since fizzled out. His political allies during the presidential election campaign have also split and weakened the countrys opposition. His Democratic National Alliance (DNA) party rejected Fridays guilty verdict and argued that the court martial was seriously flawed from the start. Our position was that he could not be charged before a court martial after he retired from the army, DNA lawmaker and party spokesman Anura Kumara Dissanayake said. General Fonsekas lawyers were not present when the court martial concluded its work today and some of the witnesses were called at a time when defence lawyers were not present. This is not justice, Dissanayake said. International rights groups have expressed concern over the generals incarceration and criticised the use of closed-door military courts to try him without using the civilian legal system. Fonseka has filed several cases in both the appeal court and the supreme court challenging the legality of his arrest. He has also petitioned the Supreme Court challenging Rajapakses re-election, alleging the vote was rigged - a charge the government denies. Rajapakse, who has a firm grip on power in Sri Lanka, has been accused by political opponents and international human rights groups of suppressing dissent since his resounding re-election.