The International Criminal Court said Former Ivory Coast president Laurent Gbagbo and his co-defendant Charles Ble Goude will be "released to a state willing to accept them on its territories."
Former Ivory Coast president Laurent Gbagbo was freed from detention by the International Criminal Court on Friday.
Reading a unanimous decision by a five-strong appeals panel, presiding judge Chile Eboe-Osuji ordered Gbagbo and co-defendant Charles Ble Goude "to be released to a state willing to accept them on its territories."
The men were acquitted of atrocities charges on January 15 but had been kept in detention pending objections by prosecutors, who plan to appeal against the acquittal and sought guarantees that the men would return to court later if required.
The panel said it would publish fuller details of the conditions imposed later on Friday. It said they were needed to "protect the integrity of the process" and directed the court's registry to "identify and enter into arrangements with States willing to accept Mr Gbagbo and/or Mr Ble Goude on their territories and enforce the conditions".
The need to make arrangements meant the timing of the men's release was unclear, but it was likely to be within hours, said Gbagbo's lawyer, Geert-Jan Knoops.
"After two weeks waiting in jail, it’s quite a relief," Knoops said. "Somebody who’s acquitted should not be detained."
Knoops said he did not know whether it would be possible for the former president to return to Ivory Coast, as he did not yet know the specific conditions of his release.
Gbagbo's family have said he would ultimately like to return to Ivory Coast but indicated he may first go to Belgium, where he has relatives. Ble Goude's intentions are not known.
Gbagbo's potential return to his homeland is complicated by the fact that he was handed a 20-year sentence there for embezzlement, after a trial in absentia, in January 2018.
Gbagbo, who ruled Ivory Coast from 2000-2011, has spent seven years in custody in The Hague.
Judges at the trial said the prosecution case linking Gbagbo to election-related violence in 2010 and 2011, in which some 3,000 people were killed, was "exceptionally weak" and that it was unlikely the acquittals would be overturned.
But the appeals chamber was willing to hear prosecution arguments that Gbagbo might not return for future court hearings if he were set free.
Gbagbo's acquittal was criticised by groups representing those who died in violence during the 2010 election, in which Gbagbo refused to concede defeat to his rival, Alassane Ouattara.
Hundreds of thousands fled the unrest that prosecutors blamed on Gbagbo, and victims fear his return home could revive hostilities in Ivory Coast.