Follow CNN's Matthew Chance on Twitter for the latest updates from Tripoli.

Tripoli, Libya (CNN) -- The Moammar Gadhafi loyalists who had been holding journalists in Tripoli's Rixos Hotel for five days "essentially just capitulated" upon realizing that most of the rest of the city had fallen to rebels, CNN's Matthew Chance said after his release Wednesday.

Their release ended what some were beginning to fear was a hostage situation for the three dozen journalists who had been kept inside the blacked-out hotel as fighters loyal to the National Transitional Council fought their way into the Libyan capital. Chance, a senior international correspondent for CNN, said "the reality slowly dawned" on their guards that Gadhafi's government was collapsing.

"They really believed that Gadhafi was coming back, that he was beating the rebels," Chance said after his release. "That's what the government line has been on this all along."

But as the rebels advanced through the city and overran Gadhafi's Bab al-Aziziya compound on Tuesday, "It became more and more obvious that there was nothing really outside of the hotel that was in Gadhafi's control."

Wednesday, the guards handed over their weapons and told the journalists, "We're going to let you go," Chance said. The release was coordinated through the International Committee of the Red Cross, which, along with the BBC, provided cars to drive them out.

CNN producer Jomana Karadsheh said the men who held them "really did not know what the scenes on the streets of Tripoli were like." Shortly before the guards gave up, she said, one guard asked a companion, "You were out there -- tell me, what's really going on? Is it what they are telling us?"

Chance called the experience a "nightmare," saying the journalists wept with relief after their release. The "die-hard Gadhafi loyalists" who held them thought they were NATO spies, he said. On Tuesday, one shouted "I suppose you're happy now that they're killing Libyans," he said.

The reporters had been bandying about "all kinds of paranoid scenarios" about what would be done to them, like being used as human shields or executed "by some lunatic hard-liner," Chance said. But in the end, all were released unharmed.

"Everybody's been hugging each other," Chance said. "People who have been living cheek-to-jowl for the past five days, sleeping in the corridors, wondering whether we were going to make it -- it's all very emotional," he said.

iReport: Are you in Libya? Share photos

Chance had described on Twitter the process of going free, piling into a car with other journalists, and driving away from the hotel that had become a virtual prison.

"I can see the NTC rebels. We are nearly there!" he wrote, followed a moment later by: "Rixos crisis ends. All journalists are out!"