Jean-Pierre Bemba, the Congolese ex-vice president whose war crimes conviction was quashed on appeal last week, must be released, judges at International Criminal Court ruled on Tuesday.
Bemba will be handed over to neighbouring Belgium, where his wife and five children live.
Judges in The Hague ordered him not to make public statements about a second case, in which he is accused of witness tampering.
Bemba, 55, has been in the International Criminal Court detention centre since his arrest in 2008. He was convicted in 2016 of war crimes and crimes against humanity and sentenced to 18 years in prison, after a militia he commanded committed mass murder and rape in neighbouring Central African Republic.
But that conviction was overturned on appeal last Friday, in a major setback for prosecutors. Appeals judges said they could not pin responsibility on Bemba for crimes committed by soldiers under his command.
More on this: Bemba seeks release from ICC after war crimes acquittal
The Democratic Republic of Congo opposition leader was the highest ranking official among only four people who had successfully been prosecuted at the permanent war crimes court since it was set up in 2002.
The ruling granted a request earlier Tuesday submitted to the court by his defense attorney, Melinda Taylor.
Normally suspects are immediately released after an acquittal, but Bemba also faces sentencing for the separate charge for witness tampering during the trial, which could result in a maximum five-year jail term and a fine.
The charge for tampering was brought in November 2013 and prosecutors said that Bemba should remain in custody until a final sentence is issued in that case. The judges rejected that request.
Under the terms of his release, Bemba will be able to speak about his acquittal but was ordered not to contact witnesses or discuss the ongoing case. He must also inform the court of his whereabouts.
A hearing on his sentencing for witnesses tampering will be held on July 4.
Taylor argued that Bemba has already spent a decade in jail and that the possible maximum five-year sentence for witness tampering could at most add a few months prison time.
"It is not logical that he would risk becoming a fugitive from justice for those three months," Taylor said. Bemba signed a document accepting any conditions the judges might attach to his release, she said.
Asked about Bemba's plans after being released, defense lawyer Peter Haynes said: "He's never given up on his political ambitions ... I'd be surprised if he can stay away from it".
If he were to return to Congo, Bemba would bolster opponents of longtime President Joseph Kabila before a December election. Kabila's allies had indicated he might disregard term limits and stand a third time, but Prime Minister Bruno Tshibala said on Tuesday he wouldn't run again.