Stay Updated on Developing Stories

Trapped for hours, they shared their fears in this group chat as terrorists roamed the halls

(CNN) It had been hours since the terrorists burst into the Dusit hotel complex in Kenya, and you could feel the desperation in the air.

Armed with guns and explosives, they roamed the halls, shooting at anything that moved.

As day turned into night, not much was known about the attack in Nairobi -- word was trickling out in bits and pieces. Those trapped inside sent out pleas on social media, asking people to get them help.

Philip Ogola, a Red Cross volunteer who describes himself as a "digital humanitarian," saw the desperate messages and created a group chat for those trapped in the buildings.

With phones their only connection to the outside world, those shared chats on popular messaging app WhatsApp became a lifeline for the victims during the standoff that started at 4 p.m. on January 15 and lasted nearly 16 hours.

A woman hides behind a car during last week's terror attack at a hotel complex in Nairobi.

First few hours: Fear and uncertainty

The gunshots and explosions popped relentlessly. Some of the people trapped turned off the lights and crawled under tables. Others crouched inside kitchen cabinets. Dazed, bloodied victims occasionally dashed out of the buildings.

Those under siege sent out pleas on the group chat, asking whether help was coming. How long would it take Recce, a Kenyan special forces team, to get to them, they wondered.

Next few hours: Gunshots, then silence

The hours dragged on. Some started to worry that the rescuers forgot them. Others wondered why the gunfire kept going. When it finally stopped, they questioned why it was suddenly quiet, whether the special forces sent to rescue them had retreated.

"I can hear my eyelids blink," one message said.

Night turns to day: A glimmer of hope

The clock ticked past midnight, and Tuesday turned into Wednesday. The usually bustling suburb of Westlands became a ghost town. But outside the complex, Ogola waited with other rescuers and some of the victims' relatives. Authorities gave them an update on what part of the complex the police and special forces were in. Ogola asked those in the group to name their locations so police can get to them.

Almost over: The focus is on the injured

The messages in the group alternated between reassuring the victims and providing medical help to those suffering from gunshot wounds. The group members included a doctor and a Red Cross official who shared tips and images on how to stop bleeding. Issa Premji, a Red Cross official in the group, said the injured victims included a pregnant woman. The tips to stop the bleeding likely saved lives, he said.

The siege ends: Not everyone makes it out

When Kenyan authorities declared the siege over on January 16 -- nearly 16 hours later -- Ogola and other rescuers asked those in the group to check in. Some sent quick one-liners saying they'd been rescued. Others did not say a word -- their batteries had died. But others stopped responding before the guns fell silent. They were among the 21 people killed in the attack.

The aftermath: Hope amid chaos

While the number of people rescued from the group is unclear, Ogola said they helped coordinate 124 people during the standoff. The government said a total of about 700 people were rescued from the buildings.

Philip Ogola helped create a group chat during the Kenya terror attack last week.

CNN obtained the WhatsApp group chats, but did not publish them all or identify the people involved because some of them were killed. The people who sent messages in the group chats are referred to as victims to avoid giving away their identities.

Ogola said he created the group with Kenyan journalist Boniface Nyaga after people reached out to them with numbers of relatives trapped in the complex. Those under siege provided details and phone numbers of others trapped with them, and the group grew from there.

They also combed through social media and saw posts from others who were hiding in the complex and asking for help. Before adding people to the group, they tried to verify their identities with their employers or loved ones to ensure the group was limited to victims and rescuers.

"We quickly had to step in to keep them safe," he said. "We started off by telling them, 'please, do not disclose your location on social media. For your safety. Be very discreet. The terrorists are also tech savvy, they could be on social media.'"

Wanjiku Mugo was crouched under a table in an office with about 30 other people between 4 p.m. and 4 a.m. when the special forces rescued them. She said the group kept them calm and optimistic that help was coming.

Before the group was formed, she said, they'd lost hope and had nowhere to turn for information. But inside the pitch-black room, every time her phone screen lit up with a new message, she felt a little more hopeful.

Outbrain