Zimbabwean opposition politician Tendai Biti has appeared in court in handcuffs on charges of inciting violence after he was deported from Zambia.
Zambia’s government rejected Mr Biti’s request for asylum on Wednesday.
Zimbabwe’s President Emmerson Mnangagwa said Mr Biti had been released on bail following his intervention.
Prosecutors accuse Mr Biti of fuelling illegal protests by rejecting Mr Mnangagwa’s victory in the fiercely contested elections on 30 July.
At least six people were killed two days after the vote in clashes between security forces and MDC Alliance supporters who alleged that their leader, Nelson Chamisa, had been robbed of victory.
There was great optimism that the elections would bring real change after the end of Robert Mugabe’s 37-year rule in November.
But the MDC Alliance says the security forces have launched a brutal crackdown on the opposition following the disputed poll.
Mr Biti is the first senior opposition politician to be detained since Mr Mnangagwa took over from Mr Mugabe.
A handcuffed Mr Biti was brought to court in the capital, Harare, under a strong police presence.
Prosecutors say he falsely declared Mr Chamisa the winner of the election, and encouraged his supporters to damage property during protests against the election results.
Mr Biti was freed on $5,000 (£4,300) bail, and ordered to surrender his passport.
“We will keep on fighting,” he told reporters.
In a tweet, Mr Mnangagwa said his intervention led to Mr Biti’s release.
“At such a crucial time in the history of the new Zimbabwe, nothing is more important than unity, peace and dialogue,” he added.
However, Mr Mnangagwa said that because of the “serious nature of the allegations” against Mr Biti, “due process will continue”.