Porfirio Lobo will be sworn in as president
Military commanders in Honduras have been cleared of abusing their power by expelling then-President Manuel Zelaya from the country last June.
The Supreme Court dismissed the charges brought by state prosecutors against the six commanders.
Conservative Porfirio Lobo is due to be sworn in as president on Wednesday, following elections in November.
Mr Zelaya, who sneaked back into the country in September, is then expected to leave Honduras.
He is due to travel to the Dominican Republic under the terms of an agreement signed by Mr Lobo and Dominican President Leonel Fernandez last week.
Hours after the Supreme Court issued its ruling, the Honduran Congress voted to approve an amnesty for both the military and Mr Zelaya, who had faced charges of treason.
The military commanders had been accused of exceeding their authority by ordering soldiers to put Mr Zelaya on a plane to Costa Rica at gunpoint on 28 June, 2009.
Manuel Zelaya has been living in the Brazilian embassy since September
Supreme Court President Jorge Rivera said in a statement that "prosecutors failed to prove the military chiefs acted with malice," the Associated Press reported.
He said the commanders were justified because they wanted to preserve the peace and did not intend to cause Mr Zelaya any harm.
The head of the armed forces, Gen Romeo Vasquez, air force chief Gen Javier Prince, and the navy commander, Gen Juan Pablo Rodriguez were among the officers being prosecuted.
Mr Zelaya was forced into exile on 28 June after trying to hold a vote on whether a constituent assembly should be set up to look at rewriting the constitution.
His critics said the vote, which was ruled illegal by the Supreme Court, aimed to remove the current one-term limit on serving as president and pave the way for his possible re-election.
Mr Zelaya has repeatedly denied this and pointed out that it would have been impossible to change the constitution before his term in office was up.