Trial judges had earlier ordered Gbagbo and his right-hand man Charles Ble Goude to be immediately freed after clearing them of any role in a wave of post-electoral violence in 2010-2011 that killed 3,000 people.
Celebrations erupted outside the court and Gbagbo's daughter said he planned an emotional homecoming to the Ivory Coast, after seven years in detention.
But prosecutors filed a last-ditch challenge late Wednesday to keep the pair behind bars while the ICC looks at an overall appeal against Tuesday's decision to acquit them.
"Pending the decision of the appeals chamber on this prosecutor's request... Mr Gbagbo and Mr Ble Goude shall remain in ICC custody," an ICC spokesman said.
The Ivorian pair can themselves appeal by a deadline of 1100 GMT on Thursday.
Prosecutors say there is a risk that if released now, Gbagbo and Ble Goude will refuse to return to face justice if the court later decides to overturn their acquittal.
The court's decision to clear the two men had come as a major blow to ICC prosecutor Fatou Bensouda, as it was the latest in a series of failed cases against former African leaders.
>> Read more: Ivory Coast’s Laurent Gbagbo, the strongman who refused to let go
Gbagbo and Ble Goude have been on trial since January 2016 over the bloodshed that gripped the former French colony after Gbagbo refused to concede defeat to his bitter rival, and now president, Alassane Ouattara in a presidential vote.
Judges stopped the trial midway on Tuesday due to an "exceptionally weak" prosecution case, and earlier on Wednesday they rejected an initial bid by prosecutors to keep Gbagbo behind bars.
'Overwhelmed with joy'
Gbagbo's daughter Marie Laurence had said her father planned to return home after his release.
"We are so overwhelmed with joy, we are proud of Dad. He went through it with dignity," she told reporters outside the ICC following the earlier decision.
"We think that it was for a cause and that the message was clear -- an innocent standing for Africa. Justice prevailed, the truth came out," she added.
Read More (...)