A court in Kyiv has released Ukraine opposition leader Mikhail Saakashvili, who had been arrested at the weekend accused of wanting a to stage a coup.
The judge said there was no basis on which to detain him.
It's the latest twist in his dramatic standoff with the authorities whom he accuses of widespread corruption.
Saakashvili, president of his native Georgia for nine years until 2013, moved to Ukraine after a popular uprising there and served under Poroshenko as a regional governor from 2015-2016, before falling out with the Ukrainian leader.
Prosecuters had wanted Saakashvili placed under house arrest while he was being investigated - a move dismissed by the opposition leader as a bid to undermine his campaign to unseat President Petro Poroshenko.
Ukraine's government is facing a chorus of criticism over perceived backtracking on reforms and attacks on anti-corruption institutions.
Saakashvili's detention sparked a well attended march through central Kiyv to protest against his arrest while calling for the impeachment of President Poroshenko.