Tendai Biti is accused of inciting violence after rejecting the president’s election victory.
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”.
Meanwhile, the UN refugee agency said it was “gravely concerned” by reports that Mr Biti had been deported while trying to claim asylum in Zambia.
“Forcibly returning refugees and asylum-seekers to their country of origin is a serious violation of international refugee law,” the agency said in a statement.
Mr Biti’s lawyer Gilbert Phiri said Zambia’s High Court ruled on Wednesday night that Mr Biti should not be deported until a “judicial review” of the government’s decision to reject his asylum application.
However, Zambian immigration and police officers refused to accept the court papers, and surrendered him to Zimbabwean law enforcement officers at the Chirundu border post, about 350km (220 miles) north of Zimbabwe’s capital, Harare, Mr Phiri said.