Rajapaksa signed the papers ordering for the release of Fonseka prior to his departure to Qatar, presidential spokesman Bandula Jayasekera told reporters here.
The papers were handed over to presidential chief of staff Gamini Senarath for onward transmission to the ministry of justice tomorrow, following which the formalities for Fonseka's release would be completed. Rajapaksa departed last night on a state visit to Qatar.
Fonseka is currently serving a three-year jail term, having been convicted by the High Court in what was termed as the 'white flag' case.
He was charged of causing public disaffection of the state through his statement that the senior defence establishment had ordered the killing of LTTE formers who turned up at the Army with white flags during the final day of the military clashes in May 2009.
Expectations for Fonseka's release had mounted when his wife Anoma said Rajapaksa earlier this week that Rajapaksa had expressed a desire to grant him a presidential pardon. Fonseka also received bail this week in the case where he was accused of harbouring military deserters.
As the military chief, Fonseka had led the Sri Lankan Army to a crushing victory over the LTTE rebels in 2009. But he fell out with his commander-in-chief Rajapaksa immediately after the war ended. Rajapaksa ordered Fonseka's detention almost immediately after he had crushed the former Army chief in the presidential election of 2010.