Sri Lanka's new government Sunday conferred the highest military rank of field marshal on retired army chief Sarath Fonseka, who had been jailed for alleged treason by the previous regime.
President Maithripala Sirisena awarded Fonseka the title at a state ceremony in the capital and said he was unjustly treated by the previous government.
Fonseka was thrown in jail after he unsuccessfully tried to challenge a re-election bid by the then-strongman president Mahinda Rajapakse in 2010.
Soon after he toppled Rajapaksein a January election, Sirisena used his executive powers to clear Fonseka of all the allegations, including treason and dabbling in politics while in uniform.
Ensuring justice for Fonseka was a "responsibility undertaken by the (new) government in our quest for justice for the whole of the army", Sirisena said.
Fonseka led troops to victory over the separatist Tamil Tiger rebels in 2009, but then fell out with Rajapakse over who deserved the credit.
The decorated general was publicly humiliated and stripped of his rank, pension and medals collected in a 40-year career. He spent two years in jail and lost the right to contest elections for seven years.
The United States considered Fonseka a political prisoner and campaigned for his unconditional release, which eventually came in May 2012.
The new president, who was backed by Fonseka in the run-up to the January 8 election, granted a pardon and completely exonerated him of previous convictions as well as pending charges of treason.
Soon after his 2010 poll defeat, Fonseka was detained on a charge of corruption relating to military procurements and then given a 30-month jail sentence.
In November 2011 he was sentenced to three more years in jail for saying that Tiger rebels who surrendered had been killed on the orders of Rajapakse's brother Gotabhaya Rajapakse, the then-defence secretary.
Fonseka had also angered the government by saying he would testify before any international tribunal probing possible war crimes charges.
Sri Lanka's former government had denied any civilians were killed by its troops at the climax of the 37-year war in 2009, which is believed to have left up to 100,000 people dead.