JERUSALEM - Night after night, lying alone in a darkened Gaza City room that became his jail cell, Alan Johnston longed to see the sun again and dreamed of being set free.
On Wednesday, after 114 days of uncertainty that he likened to "being buried alive," the BBC correspondent's dreams came true.
In a release that was almost as chaotic as his March 12 abduction, Johnston's ordeal as the longest Westerner ever held captive by Palestinian militants in the Gaza Strip came to an end.
"The last 16 weeks have been the very worst you can imagine of my life,"
Johnston said shortly after his release. "It was like being buried alive, really removed from the world, and occasionally terrifying."
Johnston's release was a political coup for Hamas leaders who are struggling to establish themselves as the rightful rulers of the Gaza Strip after they took control of the coastal region last month by uprooting Fatah rivals loyal to Palestinian Authority President Mahmoud Abbas.
By securing Johnston's freedom, Hamas was able to garner some international goodwill and send a message that it will not allow Gaza Strip families to continue using kidnappings and threats to exert political pressure.
Looking pale and thin, Johnston returned to Jerusalem on Wednesday afternoon wearing blue jeans and a blue shirt. His trademark shaved head known so well to BBC viewers had been replaced by a balding head of long, dark hair.
One of the first things Johnston did as a free man was get the dark hair shorn off -- one small symbolic return to normalcy for the soft-spoken Scotsman clearly overwhelmed by the media glare he faced upon his release.
Sounding as calm and composed as he always did while reporting for the BBC, Johnston described the 114 days as the worst of his life. On the first night in captivity, Johnston said the militants handcuffed him, threw a dark hood over his head and rushed him outside where he wondered if he might be executed.
Soon, though, his captors assured Johnston that he would not be tortured or killed, that he was a political pawn. After a few days in a room with light, Johnston was moved to a more secluded room where the shutters were kept closed. It would be three months before he would see the sun again.
He celebrated his 45th birthday in that room and survived on mediocre Gaza Strip food that occasionally made him sick.
There were days of despair and depression, false hopes and frustration. Once, Johnston was told he was going to be freed -- only to be taken to a new hideout. Johnston, who lived in Gaza for three years as the BBC correspondent, described a "special journalistic hell" at being held captive last month as Hamas seized control of the Gaza Strip.
Johnston was given few luxuries during his captivity. But one thing that helped him get through was a small radio that allowed him to keep in touch with the outside world. More importantly, Johnston was able to listen to the high-profile BBC campaign to keep his case in the public eye.
He heard news of demonstrations taking place in London and Gaza and Jerusalem and Buenos Aires. He listened to friends discussing his fate. And he took comfort in the advice from former hostage Terry Waite, an Anglican hostage negotiator held for four years in Lebanon, who urged Johnston to take each day and hope the next would be better.
Johnston said he was rarely mishandled. One day, when negotiations over his release appeared to be falling apart, he was shackled by his wrists and ankles for 24 hours. And, on his final ride to freedom, Johnston said he was knocked around by the anxious militants taking him to safety.
"I literally dreamt of being free again and again," Johnston said, speaking almost as if he was still in a daze. "I always woke up in that room. It is almost hard to believe that I am not going to wake up in a minute in that room again. But I don't think so."
Hamas leaders made Johnston's release one of their top priorities after they took control in Gaza. Hamas initially announced that a deal had been reached. But the militants behind the kidnapping, the Army of Islam, publicly dismissed the offer. Hamas then issued an ultimatum: Free Johnston or we will send in our military. The Army of Islam responded by releasing a 90-second video of Johnston wearing an explosive vest.
"They say they are ready to turn the hideout into what they describe as a death zone if there is an attempt to free me by force," an anxious Johnston said on the video.
Johnston said Wednesday that the vest was real, but that his captors told him it was not fully armed.
Despite the threat, Hamas refused to back down. Over the weekend, Hamas arrested an Army of Islam spokesman and three other militants. The Army of Islam, led by a powerful member of the Dagmoush family in Gaza City, responded by abducting 10 Hamas allies. In late-night negotiations, the captives were all freed, setting the stage for Johnston's release.
Sitting next to deposed Palestinian Authority Prime Minister Ismail Haniyeh, Johnston praised Hamas for working to secure his freedom.
"To be quite honest, I think if it hadn't been for that real serious Hamas pressure, that commitment to tidying up Gaza's many, many security problems, then I might have been in that room for a lot, lot longer," said Johnston.
Fatah leaders in the West Bank welcomed Johnston's release, but suggested that it was little more than political theater orchestrated by two militant groups that have worked together in the past.
"This was a kind of B-movie Indian melodrama," said Yasser Abed Rabbo, a top political adviser to Abbas. "They want to present themselves to the international community with a different face after the coup in Gaza. They need badly some international recognition. That's why they released him."