FREETOWN, Sierra Leone—A great quarrel followed the death of a pregnant Guinean woman in June. Mourners refused to allow a team of outsiders dressed in what looked like white space suits to bury her Ebola-infected corpse. If she was to be saved from eternal wandering and reach the village of the dead, they insisted, her fetus must be removed.

Impossible, the outsiders said. Her virus-laden blood was far too contagious for anyone to cut into her body.

Yet the villagers would not relent. In their traditional Kissi culture, a woman buried with her fetus disturbs the world’s natural cycles—beginnings and endings among humans, animals, and plants. In the same way, it is said, mixing the seeds of last year’s harvest with this year’s complicates the fertility of the crop, as well as the fertility of women. Even if the surgery was as dangerous as the outsiders suggested, the villagers worried that the results of disrupted natural cycles could be worse.

Exasperated, the district medical officer called an anthropologist originally from Cameroon to help him find a solution. From decades of experience in West Africa, Julienne Anoko knew there must be ways to make reparations to the spirits for ceremonies that could not be performed as tradition demanded.

“Eventually, I found a very old man whose grandfather was one of the ritualists in charge of reparations,” she says. “He had inherited the reparation ritual, and told us how it was to be done.”

The villagers would need a goat, 12 yards of white tissue, salt, oil, and rice. Anoko, who was working for the World Health Organization, provided each item, and the community accepted them. At sunset, she watched the ceremony begin with the distribution of smooth kola nuts, symbols of respect. A world away, burial workers in sweltering hot Tyvek suits hygienically laid the pregnant woman to rest.

Anoko’s solution was the exception until recently. Scenes of conflict were frequent in Guinea, Sierra Leone, and Liberia—the three countries hardest hit by Ebola—as medical authorities tried to separate the dying and the dead from their communities. Ambulance drivers and burial teams were pelted with stones.

In the worst attack, eight people distributing information about Ebola in Guinea were killed. Villagers often retreated with ill relatives into the forest, where they could hide—and where the deadly virus then quickly spread.

“The problem was that the people handling the intervention only looked at this as a health issue; they did not try to understand the cultural aspects of the epidemic,” Anoko says.

But Anoko and others familiar with local customs helped health officials realize that they could not curb Ebola until they found ways to accommodate deeply held beliefs about the obligations of the living to the dying and the dead.

As health workers and burial teams have altered their procedures, and as political, tribal, and religious leaders pressed people to adapt their traditional ceremonies, the spread of Ebola has begun to slow.

Science Confronts Culture
In the three countries hit hardest by Ebola, preparations for burial typically are carried out by community members who handle the dead with bare hands, rather than by doctors, morticians, and funeral home directors. People were unwilling to have those practices casually tossed aside. That worked in Ebola’s favor. As death approaches, virus levels peak. Anyone who touches a droplet of sweat, blood, or saliva from someone about to die or just deceased is at high risk of contracting the disease.

To health authorities, the solution was simple. With so much at stake, science eclipses religion: Risky rituals must end.

“People were expected to go from one end of the spectrum to the other; from washing the bodies by hand, dressing them, and holding elaborate ceremonies, to having a corpse in a body bag and no goodbye,” says Fiona McLysaght, the Sierra Leone country director for a humanitarian organization called Concern Worldwide.

Spirituality runs wide and deep in Sierra Leone, Liberia, and Guinea. The population consists mainly of Christians and Muslims. Christians close the eyelids of the dead, wash and dress them. Muslims wash the dead as well, but wrap them in a white cloth. There are also rituals particular to ethnic groups—such as the Kissi, the Mende, the Sherbro, and the Kona—as well as secret societies.

The details of tribal and secret society ceremonies are closely held, but some hints come from locals and anthropologists with regional expertise.

According to anthropological accounts, the Kissi, for example, sacrifice an animal over a stone at the dead person’s tomb and then place the stone at an altar devoted to ancestors. The Sherbro may examine the body to determine whether the deceased had been a witch who caused harm. If so, the spirit must be rendered innocuous before burial, lest it cause crop failures and other misfortunes.

A third layer of ritual comes in with secret societies, groups that conduct clandestine ceremonies throughout the region. Secret society leaders must be buried in a particular manner to transfer their powers to a successor. Unwilling to go into detail, Sidikie Sankoh, a youth leader in Freetown, tells me gravely, “If these rituals are not done, there are consequences.”

These layers of belief mean that death in West Africa is accompanied by a complex and sacred blend of rituals. If they are ignored, the dead are thought to wander the Earth eternally and plague the community. To Westerners, the rituals ring of a forgotten past. But they serve the same purpose as death rituals around the world: closure through saying goodbye to loved ones before death, and paying respect to the deceased.

Distrust Thwarts Compromise
Neither of these tenets was respected in the Ebola response until recently.

Throughout most of this outbreak, there were not enough beds and staff to care for the sick, so overwhelmed nurses sent the ill from one hospital to another—without keeping track of who went where. Those who died were often whisked to unmarked graves. Families were left not knowing whether their loved ones were alive or dead—and, if they were dead, where they had been buried.

These disappearances stoked conspiracy theories that Ebola was a hoax. In one, doctors were said to be killing patients to steal their organs. The less people believed that Ebola was real, the less likely they were to bring deathly ill relatives to clinics and to stop honoring their dead relatives in the traditional way.

In September, October, and November, governments and international aid agencies ranted and raved about stubborn villagers. Meanwhile, anthropologists pressed them to understand the beliefs of the people whose attitudes they wished to change.

“You have to take into account a history in which local people have learned to distrust the government,” says Paul Richards, an anthropologist at University College London who has worked in Sierra Leone for 40 years. “It’s a situation not unlike that in Ferguson, Missouri, where a legacy of slavery, exploitation, disregard, and abuse leads people to think their own solutions are better than those from the outside.”

He adds, “It doesn’t help that outsiders are dressed in astronaut suits.”

Richards knows compromises could be reached. He remembers that ceremonies were altered during Sierra Leone’s brutal “blood diamond” civil war and suggests those same ceremonies might be revived now. Back then, people found ways to honor the dead they had abandoned as they fled their villages.

“Burial rituals were flexible,” he says. “The spirits are totally practical!”

One hot afternoon in eastern Sierra Leone, Haille James, of the Kissi tribe, tells me what his people did when a body could not be found.

“You would go to the place where you think the person died and leave a piece of metal—four days for a man and three days for a woman,” he explains. “After that, you hold the metal on your head and bring it to your home, where you cover it. Then you can cry, bury it in a place, and pray.” Tamba Aruna, a mental health counselor in Sierra Leone and a member of the Kono tribe, says similar rituals occurred in his community during the war, only with a stone instead.

Pastors, Imams, Chiefs Stop Rituals
Nearly five thousand people had died of Ebola by November in the three hardest hit countries, and the contagion was still rising in Sierra Leone. Organizations involved in Sierra Leone’s Ebola response claimed that 70 percent of new infections in that country stemmed from funeral rituals, although they cited no particular study. Erring on the side of caution, the government mandated that in Freetown, the capital city, all corpses had to be buried in body bags with sterile procedures—whether or not they were known to be infected with Ebola.

Finally, officials reached out to chiefs, imams, pastors, and traditional healers for help and advice on how to change people’s minds about burials.

By then, many of these community leaders needed little convincing. In Freetown, at the modest headquarters of Ahmadiyya, an Islamic sect, Munnirou Abyusuf explains how he came to believe the disease was real. Ebola could be a curse or some kind of witchcraft, he thought at first, when the outbreak began in the east of the country. But then it killed dozens of health workers, including virologist Sheik Umar Khan.

“When Dr. Khan died,” he says, “I thought, ‘Oh, this is a very serious thing.'”

Abyusuf consulted his holy books for guidance on how to handle burials given the danger. In The Life and Character of the Seal of Prophets, he learned of a leprosy contagion in ancient times.

“When the epidemic started, the holy prophet of Islam said that people should stay put,” he says, explaining that Muhammad advocated prayers for the deceased in absentia. Abyusuf went to his congregation and explained what he had learned: “I told people, this is not the first plague. You do not need to wash the corpse. You can pray in absentia. The rules are not absolute.”

Pastors promised their congregations similar forgiveness, and chiefs asked their people to cease all secret society rituals. Meanwhile, humanitarian organizations and the government enacted “safe and dignified burials,” during which people could pray briefly for their loved ones, while standing two meters (6.5 feet) from the white body bag.

They also hired liaisons to discuss the precautions with mourners. The liaisons try to honor reasonable requests. In some cases, that means burial workers in Tyvek suits dress the dead in outfits chosen by families before the corpses are placed in body bags. In other cases, money or jewelry is placed in body bags as a “toll” that the deceased must pay to cross over to the village of the dead.

When I visited the largest cemetery in Freetown, King Tom, it was mid-December and the problems with burials had shifted. According to government statistics, almost all corpses in the Freetown area were hygienically placed in the ground by burial teams.

In King Tom cemetery, about 50 bodies were planted in fresh, shallow pits each day. Dirt and hay particles hung in the humid air. In the space of an hour, several vans rumbled over the dirt to deliver new body bags. Small groups of men and women on foot flowed into and out of the cemetery after quick prayers. They appeared bewildered by the overwhelming scene.

The landscape resembled a construction site, with mounds of dirt and constant digging. A tractor at the periphery cleared piles of bramble and trash to make room for new graves. Now, the city faced a new issue: The cemetery had expanded to three times its former size and was nearly out of space.

Andrew Kondoh, who had been hired by Concern Worldwide to be a liaison between burial teams and mourners, met me in the graveyard. His broad, easy grin belies the tragedy he’s witnessed.

At 13 years old, he handled corpses during Sierra Leone’s civil war. Massacred bodies piled up outside of his town in the eastern region of Kenema. Not wanting people to stumble over the dead, or dogs to pick them apart, he spent his days cordoning off the bodies. “It was born in me to do community work,” he says. “I know how to console people.”

Kondoh counsels the young men and women who carry bodies to the morgue and graveyard. Because they handle Ebola-infected corpses, many have been evicted from their homes by frightened landlords and abandoned by their partners.

“Women at the corner will not sell me water. They call us ‘Ebola people,'” one burial worker tells me. Kondoh pats him on the back, and the two chuckle at the term. Kondoh adds, “If we don’t laugh, we’ll cry.”

Ali Kamara, a burial team supervisor, says that families no longer fight with his team when they come for the dead. “Before, people were hiding their corpses for two to three days,” while they washed the corpse and performed other rituals, Kamara says. “Now, it’s totally different. They call me at all hours and just say, take the body away.”

Amy Maxmen is a journalist who covers disease, science policy and evolution among other topics. She also writes about how scientists interact with the world. Her stories and photos appear in a variety of outlets, including Newsweek, The New York Times, Nature, and Al Jazeera. Prior to writing, she earned a Ph.D. in evolution from Harvard University. Her website is www.amymaxmen.com and she tweets at @amymaxmen.