A judge in Cameroon has ordered the release of a US-based author and academic who was detained for allegedly threatening President Paul Biya's life.
The judge ruled that Patrice Nganang should be expelled from the central African state, his lawyer said.
No official reason was given for the the decision to free the US citizen.
Mr Nganang was detained three weeks ago as he was about to fly out of his country of birth. He is a fierce critic of Mr Biya's 35-year rule.
The government accused him of threatening to shoot the president in a Facebook post, allegedly written after he visited the restive Anglophone west in mostly French-speaking Cameroon.
Mr Nganang pleaded not guilty during a court appearance on 15 December.
His lawyer, Emmanuel Simh, said the case was "purely political nature" against someone who was strongly opposed to Mr Biya's regime.
Mr Nganang is a literature professor at New York's Stony Brook University.
He is also the author of several prize-winning novels, including "Temps de Chien", or "Dog Days", which focuses on life in Cameroon under the rule of Mr Biya.
Mr Nganang's Cameroonian passport was seized and he was arrested, as he was about to board a flight to Zimbabwe.
His family and friends said he had been detained for writing an article for French magazine Jeune Afrique, criticising Mr Biya's government for his handling of protests by English-speaking Cameroonians.
Dozens were killed in November in a violent crackdown on protests.
Many English speakers accuse the Francophone majority of discrimination.
They say they are often excluded from top civil service jobs, and that the French language and legal system have been imposed on them.
The government denies the allegations and insists that it treats all citizens equally.
The divisions in the central African state date back to the post-colonial settlement.
Cameroon was colonised by Germany and then split into British and French areas after World War One.
Following a referendum, British-run Southern Cameroons joined the French-speaking Republic of Cameroon in 1961.
It is now divided into the South-West and North-West regions.
Demands for independence have grown in the two regions in recent years and the government has vowed to end attacks blamed on armed secessionists.