Gen Fonseka has a reputation for speaking his mind
Over a career of four decades, Gen Sarath Fonseka has been Sri Lanka's most high-profile and arguably its most tactically successful army officer.
The retired general went into the January 2010 elections hoping to capitalise on his status as a war hero among Sri Lanka's majority Sinhalese community after leading troops to victory over Tamil Tiger rebels in 2009.
Official results, however, showed President Mahinda Rajapaksa beat him soundly to win a second term, despite claims by Gen Fonseka that the vote was unfair.
Gen Fonseka was arrested shortly after the elections and in August 2010 he was found guilty of engaging in politics while on active service.
A court martial sentenced him to be stripped of his rank and medals. He also faces a jail term after being found guilty of corruption in arms procurement deals in a second court martial in September.
The general and his supporters maintain that the charges were politically motivated.
In April's parliamentary elections, he won a seat for the opposition Democratic National Alliance (DNA) while still in jail.
Gen Fonseka once told the BBC the "crowning achievement" of his military career was wiping out the rebels. He was nearly assassinated by a Tamil Tiger suicide bomber in 2006.
He was commissioned as a second lieutenant in June 1971 and rose through the ranks while completing training stints across South Asia and in the US and UK.
Over the years he acquired a reputation as a tough battlefield commander and was often in the thick of the action in fighting against the Tamil Tigers. He was wounded in action in 1993.
In the same year, as a colonel, he led a daring operation to relieve troops who at the time were under siege in Jaffna fort in the north of the country.
The general (left) and the president fell out last year
The man who is now Sri Lanka's Defence Secretary, Gotabhaya Rajapaksa, was with him during this operation.
The two men who worked so closely together then are today bitter political adversaries. Gotabhaya Rajapaksa is one of President Rajapaksa's brothers.
In 1995 Gen Fonseka won widespread plaudits for his role in Operation Riviresa - the army's operation to capture Jaffna town from the Tamil Tigers.
One of the low points in his career was in 2000 when the strategically important Elephant Pass - one of the few land routes to the Jaffna peninsula - was overrun by hundreds of Tamil Tiger rebels in a surprise attack.
Troops commanded by Sarath Fonseka offered stiff resistance but ultimately had to withdraw. It was a setback that the general was determined to avenge - Elephant Pass was recaptured by his troops in January 2009.
Like President Rajapaksa, the general has made no secret of his ardent Sinhalese nationalism and has always displayed a willingness to speak his mind.
He pulled no punches in his criticisms of President Rajapaksa's election campaign, openly accusing him of creating a climate of intimidation and violence.
During the campaign, the general was able to ally himself with several minority Tamil and Muslim parties, despite earlier rhetoric which suggested that he was none too sympathetic towards their cause.
Last year, for example, he told a Canadian newspaper that he "strongly believed that Sri Lanka belongs to the Sinhalese, but there are minority communities... they can live in this country with us. But they must not try to, under the pretext of being a minority, demand undue things".
The general's dramatic early retirement - leading to his decision to run for president - was closely linked to his disagreement with President Rajapaksa about who should take credit for the defeat of the Tamil Tigers.
Gen Fonseka may have lost the election, but the bitter campaign reflected just how serious a political threat the president felt he posed.