A Nigerian man detained in a hospital psychiatric ward because he did not believe in God has been freed.
Mubarak Bala was released because of a doctors' strike which has seen many patients discharged, a charity said.
Mr Bala said he now wanted to reconcile with his family who committed him to the hospital in Kano where he says he was held against his will for 18 days.
But he said he wanted to leave the predominantly Muslim north of Nigeria after receiving death threats.
A humanist charity which took up his case said that Mr Bala, a chemical engineering graduate, was freed on Tuesday but news of his release was not made public until he was in a secure location.
"There are still deep concerns for Mubarak's safety in a part of the country where accusations of 'apostasy' can be deadly," the International Humanist and Ethical Union (IHEU) said in a statement.
The man's family is reported to have had him committed to the hospital because it feared for his safety after he publicly stated his atheism.
'Misgivings and misunderstanding'
In a statement released on Friday, Mr Bala said he was now staying with some of his family, had been assured of his safety and wanted to put things behind him "for the sake of reconciliation".
"I have realised that my matter is a family one which requires family resolution... all misgivings and misunderstanding within my family has been resolved," the statement said.
He said he retracted "some derogatory remarks I have made online, out of anger".
His lawyer, Muhammad Bello Shehu, told the BBC Hausa Service this did not refer to his faith but to remarks he had made about his father who he accused of being an Islamic leader who could not afford to have a non-Muslim in the family.
After the 29-year-old was admitted to a psychiatric ward at the Aminu Kano Teaching Hospital, he sought help from friends via email and social media until his phone was confiscated, according to IHEU.
Mr Shehu said that no further legal action would be taken but that Mr Bala wanted another doctor to evaluate him to put it on the record that he was not suffering from a mental illness as the hospital has concluded.
When Mr Bala was first detained IHEU said his family had asked a doctor if he was mentally ill because he had told relatives that he was an atheist.
Despite being told that he was not unwell, Mr Bala's family then went to a second doctor, who declared that his atheism was a side-effect of suffering a personality change, the group said.
Some states in northern Nigeria adopted Islamic law after the end of military law in 1999.
The BBC's Nigeria correspondent Will Ross say religion is a sensitive issue in the country especially as Islamist insurgents are fighting in the north-east to impose an Islamic state.