A volunteer and a soldier carry a victim across the mud after the partial collapse of a hillside.

DAKAR, Senegal — Sidi Tunis was on his way to work at Sierra Leone’s parliament in the capital of Freetown when he saw the first images of the mudslides. As more and more pictures lit his phone screen, Tunis, the country’s tourism minister, decided to take a detour through the capital’s windy, hilly streets to the disaster scene. When he arrived at Regent’s Hill, about 10 miles outside Freetown, he saw that a huge part of a hillside had clawed off, crushing hundreds to death as it slammed below.

But something else about the scene struck him.

“It was already packed with ambulances and fire trucks. Young people were already digging through the rubble,” Tunis told BuzzFeed News in a phone interview from Freetown. “During Ebola we had a lot of community engagement, so they knew how to be first responders. They knew how to do search and rescues, they knew how to convey corpses safely to the morgue.”

Just three years ago, none of this would have been likely — or, at the very least, it would have been far more chaotic. But as Sierra Leone grapples with its worst natural disaster in almost half a century, it is drawing on lessons from the deadly Ebola crisis that killed almost 10 times as many people and posed a public health crisis so severe it became a global emergency.

The mudslide began on August 14 after three days of torrential downpours had lashed Freetown, creating waterways that churned down its steep streets. By Saturday, 499 dead bodies had been pulled out from rubble across the affected areas, Tunis said. More than 600 people are still missing and corpses continue to be swept in by tropical rains, which has led to fears of a cholera outbreak. The government has said there is a shortage of emergency response supplies, from wellies to glove disposal stations.

Afolabi Sotunde / Reuters

A worker digs graves at a cemetery.

The young men digging through the rubble in Regent’s Hill were those who had trained as Ebola burial teams. Most of the ambulances on the scene had been imported during the epidemic. Before that, a national ambulance system barely existed — in one case, a district of half a million people was served by just four public emergency vehicles.

And as hours went by after the mudslide and bodies began to decompose in the soggy heat, volunteers knew from dealing with the highly contagious Ebola virus that small measures — like wearing masks and gloves then safely disposing of them, to prevent the risk of waterborne disease — took on outsized significance.

Within hours after the mudslides, a national disaster emergency unit was set up. Tunis, who served as the government’s top Ebola coordinator during the crisis, was in charge. The daunting task felt more manageable because of his recent experience, he said.

“Reactivating the whole response structure was very easy for us. When it came to burials, people came out voluntarily in a very short time. We had 200 young men within the first day, a lot of whom had been on the burial team.”

Disaster has stalked Sierra Leone, one of the world’s poorest countries, so frequently that the worst flooding disaster in living memory has caused little concern among the international community. Among the biggest emergency aid contributors is Togo, itself a tiny neighboring country, as Sierra Leone struggles to attract aid it desperately needs.

And while the country continues to apply its experience from the Ebola crisis, relief workers say the emotional toll from the latest disaster has been high.

“To see the same sort of thing in the city — ambulances rushing around, people wearing protective masks, huge burials taking place — that’s pretty traumatic,” said UNICEF's country spokesperson John James by phone from Freetown.

Mohamed Saidu Bah / AFP / Getty Images

People carry the coffins of mudslide victims during a mass burial.

In the frantic hours after the news about the mudslide came in, Idalia Amaya noticed something unusual about the first emergency coordination meeting: Even this early, there was a full house.

“Ebola [has] been a bit of a blessing in disguise because it meant we have such a large international presence of NGOs already in the country,” Amaya, emergency coordinator for Catholic Relief Services, told BuzzFeed News.

Ebola’s rapid spread across Sierra Leone came in part because it overwhelmed health systems broken by an 11-year-long civil war that ended in 2002. Buckling under the epidemic, aid agencies flocked to help contain the virus.

But blanket aid from NGOs in developing countries isn’t all praiseworthy, Amaya said. When she worked during the Philippines' devastating 2009 floods, for example, cluster systems were set up and led by the United Nations, the world’s largest multilateral aid agency. A similar template was largely followed during the Ebola crisis.

“There was a lesson learnt from Ebola that instead of creating parallel system of NGOs, let’s take leadership from the start," she said. "So this time it’s been led by the government from the onset, and having them take that ownership is more of a sustainable system."

Still, NGOs playing a critical role are in a better position than they might typically have been.

Three days after the mudslide, unclaimed bodies piling up in Freetown’s main mortuary posed another health risk. There were so many that they began to decompose in the tropical heat, prompting the government to order mass burials over the following two days. Workers from UNICEF were among those who helped scrub out the morgue during a massive clean-up operation that followed.

Perched on stunning, steep hills, Freetown’s winding narrow streets and cramped living conditions are perfect for spreading water-borne disease like cholera. Built for a population of 300,000 using horse-drawn carriages, the capital’s population has swelled sixfold in the last half century.

Among the first things Tunis, the minister in charge of managing the emergency response, ordered was to reactivate the 117 hotline — the telephone number that three years ago would have sent an ambulance to pick up an Ebola victim. This time though, callers were advised on what to do if they started showing cholera symptoms.

UNICEF, among others, now faces a race against time to carry out a vaccination program in the coming days. In a bid to buy more time, the government announced mass burials on Thursday and Friday, when more than 300 victims were laid to rest.

But even then, tiny details picked up from the Ebola crisis are helping.

In 2014, the outbreak was exacerbated by unsafe burial practices — rather than undergo the pain of seeing their loved ones buried in mass graves, some families held their own private funerals. They were more dignified, but as they weren’t carried out in sterile conditions, they typically ignited further chains of infection.

The government in recent days has repeatedly emphasized that all mass burials will take place in individual graves.

Nevertheless, the high death toll has traumatized the population that has pulled itself together since Ebola. Musa Kallon, a psychosocial worker who had dealt with numerous crises for the last two decades, said he was used to hearing stories of loss and tragedy.

Kallon’s team of 10 work in pairs and visit over 200 people a day in a door-to-door campaign providing health information about cholera, and offering therapy treatments for the worst traumatized.

Last week, as he stepped on a rickety bridge balanced over flood-swollen waters, the sound of a woman sobbing stopped him in his tracks.

“When I overheard what she was saying, I knew straight away — she’s in trouble,” he said in a phone interview.

“She was saying that as a result of seeing so many dead bodies, she can’t eat anything that has blood. She told me when she’s chewing fish, meat, or chicken, she feels like she’s chewing on a human body.”

In order to meet their target number of homes, Kallon’s teams are supposed to spend no more than half an hour, at most, in each house. Over the course of an hour, he learned that the woman had lost her husband and five children to Ebola three years ago. Her last surviving daughter was killed by the mudslide.

“Because of my experience in giving trauma support to victims, I’m strong enough to cope with all the stories I hear. But at times, as a human, a few stories really touch me,” said Kallon, who confessed it had been “hard” to sleep that night.

Afolabi Sotunde / Reuters

A woman mourns for her son at the entrance of a hospital in Freetown.

Still, the mudslide has left in its wake questions about what could have been done to prevent the deaths.

Critics believe many of the deaths were symptomatic of deep-rooted government failures. Others noted deaths would have been avoidable if, for example, the government had tackled rampant illegal construction on hillsides, or issued evacuation warnings during the three days of rains before the disaster struck.

“What measures is government going to take to make sure that in ten days when it rains again this disaster won’t happen twice as bad?” said another Sierra Leonean aid worker, who asked not to be named due to the sensitivity of the topic.

While threats of further mudslides remain, temporary shelters have sprung up around Freetown to help home more than 20,000 who have been displaced. Almost 300 women and children poured into the Don Bosco Fambul Center in Angola Town in the space of three days, said Father Jorge Crisafulli, who runs the Salesian monks' shelter for children. With the centre crammed beyond capacity, many are sleeping on wooden pallets covered with tents in what is ordinarily a playground. Crisafulli said the government had asked them to shelter the displaced for two months.

“But any longer than two months of being here, people will just go back to their own homes. They can’t stay here forever, they need to work,” Crisafulli said. “My hope and prayer is that the government works out a concrete solution. I hope in two months they’re not just abandoned by the government, the media, and politicians.”