Israel has ordered a British aid worker to leave the country, accusing him of backing a militant group.
Ayaz Ali will return in time for his wife to give birth
Ayaz Ali, 36, originally from Bradford, had been held in a top security Israeli prison for three weeks without charge.
Mr Ali, who worked in Gaza for Islamic Relief, was freed on Monday and given seven days to leave Israel.
Israel had accused Mr Ali of helping groups linked to Hamas. Islamic Relief, which is Birmingham-based, said his release was a relief to aid workers.
Hamas, which is the ruling Palestinian party, runs an extensive network of social services including kindergartens and clinics.
But it is considered by the Israeli government, the EU and the USA to be a terrorist organisation.
Islamic Relief's president Dr Hany El Banna OBE said: "I am glad that this whole situation has come to an end.
"It is a great relief to Ayaz's family, humanitarian workers all over the world and Islamic Relief.
"We are grateful to all those individuals, international NGOs and the UK government who helped secure Ayaz's release."
Mr Ali, is now set to return to the UK in time for the birth of his first child.
He was arrested almost three weeks ago and since then British officials have been pressing Israel to release him, or explain why he was being held.
Agreed to leave
According to colleagues, one of his projects was a toy and book library for young Palestinian children.
But Israel said he had been helping Hamas institutions.
A Foreign Office spokeswoman confirmed Mr Ali's release and said consular staff had been present at the hearing.
"An Israeli judge ordered him to be released and he has been given seven days to leave Israel," she said.
"At the time he agreed to sign a bond undertaking that he would not return to the West Bank and Gaza."