BBC correspondent Alan Johnston has been released by kidnappers in the Gaza Strip after 114 days in captivity.
Mr Johnston, 45, was handed over to armed men in Gaza City. He said his ordeal was like "being buried alive" but it was "fantastic" to be free.
Speaking live from Jerusalem later, he thanked those who had supported him, and vowed to return to "obscurity".
Rallies worldwide had called for Mr Johnston's release. An online petition was signed by some 200,000 people.
Mr Johnston's father Graham said he and his wife were "overjoyed" at their son's release.
"It's been 114 days of a living nightmare," he said.
Gordon Brown, in his first prime minister's questions session in the UK parliament, said: "The whole country will welcome the news that Alan Johnston, a fearless journalist whose voice was silenced for too long, is now free."
Mr Brown acknowledged the "crucial" role played by Palestinian Islamist movement Hamas in securing Mr Johnston's release.
I literally dreamt many times of being free and always woke up back in that room
But a spokesman for Mr Brown said Britain's policy towards Hamas had not changed, and the movement was still expected to recognise Israel and show a commitment to non-violence.
The BBC reporter was handed over to officials of Hamas, which controls Gaza, in the early hours of Wednesday morning.
He later appeared beside Ismail Haniya, the Hamas leader in Gaza, and thanked everyone who had worked for his release. Mr Johnston is now at the British Consulate in Jerusalem but is not expected to fly home on Wednesday.
Hamas gunmen overran Gaza last month, expelling their rivals from the Fatah faction and prompting its leader, Palestinian Authority President Mahmoud Abbas, to sack Mr Haniya as prime minister.
Mr Haniya said the result "confirms [Hamas] is serious in imposing security and stability and maintaining law and order in this very dear part of our homeland".
He also said he hoped a deal could now be reached for the release of the Israeli corporal, Gilad Shalit, who has been held in Gaza since being seized in a border raid by three militant groups a year ago.
'Dreamt of freedom'
At the news conference, Mr Johnston thanked everyone who had worked towards his release.
He described his experience of captivity as "appalling" and "occasionally quite terrifying".
"It became quite hard to imagine normal life again," he said.
"The last 16 weeks have been the very worst of my life," he added. "I was in the hands of people who were dangerous and unpredictable.
"I literally dreamt many times of being free and always woke up back in that room."
Mr Johnston said he was not tortured during captivity but he did fall ill from the food he was served.
He added that he had been kept in four different locations, two of them only briefly.
He was able to see the sun in the first month but was then kept in a shuttered room until a week before his release, he said.
Mr Johnston was kept in chains for 24 hours but was not harmed physically until the last half hour of his captivity, when his captors hit him "a bit".
He said Hamas's seizure of power in Gaza and its subsequent pledge to improve security in the territory had facilitated his release.
"The kidnappers seemed very comfortable and very secure in their operation until... a few weeks ago, when Hamas took charge of the security operation here," Mr Johnston said.
He said that he was told he was going home on Tuesday night.
"I thought at first 'They are moving me again', and I thought maybe they're handing me on to new kidnappers but then as we got deeper and deeper into Gaza City, I really began at last to believe that maybe we were finishing it," he said.
Mr Johnston was abducted on 12 March by the Army of Islam, a shadowy militant group dominated by Gaza's powerful Dugmush clan.
Just over a month after his capture, it was announced that he had been killed to send a "message" to the Palestinian authorities.
The group released three videos, two of which featured footage of the kidnapped correspondent.
It said it would kill its captive if its demands for the release of Muslim prisoners in British custody were not met.
But Mr Johnston said his abductors had also offered him freedom in exchange for making one of the videos.
Having worked in Gaza for the past three years, Mr Johnston said he was well aware of Palestinian traditions of hospitality and regarded his abductors as an "aberration".
He said he was looking forward to being re-united with his family, expressing sorrow that his "actions" had brought turmoil to their lives.
He had a brief conversation with his father over the telephone after being released.
Mr Johnston said he stayed aware of efforts to free him by listening to the BBC World Service on the radio.
News of global demonstrations in his support was a source of comfort to him, he said.
"There were demonstrations from Beijing to Buenos Aires, Beirut to London to Washington and you know I could feel how much the Palestinian people were feeling that this wasn't right and how much support there was for an end to my captivity," he said.
The BBC has issued a statement expressing relief and delight at its employee's release.