OUAGADOUGOU, Burkina Faso — On the day Burkina Faso reported its first coronavirus death, militants killed four men in a northwestern village.

A few evenings later, as four government ministers tested positive for the virus, attackers torched a national park office and kidnapped a forest ranger. And as confirmed cases multiplied into hundreds, gunmen abducted a rural town’s head nurse, stole military gear in violent raids and executed several soldiers.

In this West African nation engulfed by conflict and the pandemic, every day brings more chaos and infection, rendering those caught in the middle doubly vulnerable.

Both threats are overwhelming the government. Fighters linked to al-Qaeda and the Islamic State control much of the countryside, and the outbreak is rocking the capital, Ouagadougou. There are 11 ventilators for roughly 20 million people.

Places once thought to be safe now feel increasingly dangerous, residents say: Hundreds of thousands of Burkinabes who have fled the violence are squeezing together in cramped quarters just as they are supposed to be sheltering apart — and police are enforcing dusk-to-dawn curfews with whips and automatic weapons.

“We are all focused on coronavirus while terrorism is another threat,” said Zougmore Chrysostome, president of the Burkinabe Movement for Human and People’s Rights, “and the enemy is not far away.”

Since the first case emerged in China, at least 850 people have died because of unrest in Burkina Faso, according to the Armed Conflict Location & Event Data Project’s estimates.

The virus itself claimed 30 lives by Wednesday, and the number of cases jumped to 528. More than 100 health centers in Burkina Faso have been forced to close. Militants are blocking food, water and medicine trucks in their quest to grab territory in the north and east.

Coronavirus-spurred travel bans have also slowed help: The Alliance for International Medical Action, an aid group in Senegal, said it hasn’t been able to transport critical drugs outside of Ouagadougou since Burkina Faso went into lockdown on March 20.

The combination of disease and conflict is a lethal time bomb, Xavier Creach, the U.N. refugee agency’s coordinator for the region, said in a statement.

“National capacities are overwhelmed,” he said. “The clock is ticking. We have little time left.”

About a quarter of the 838,000 Burkinabes who have lost their homes over the past 15 months found shelter with a host family in the country, according to the United Nations. They sleep outdoors when living spaces become too tight in normal times. The vast majority are already short on the basics: water, food, toilets, blankets.

David Bamogo, 47, shares two rooms with nine people. Water for regular hand-washing? There’s not enough to drink.

Social distancing and optimal hygiene do not exist — cannot exist — in his corner of the country.

“Not possible,” said Bamogo, whose family moved in with kind strangers last spring after extremists struck their village.

The coronavirus has yet to reach his adoptive town, Barsalogho. A dearth of testing, however, could be obscuring reality.

Residents are doing all they can to prevent an outbreak, said Yousouf Ouedraogo, the deputy mayor. Communal washing stations are mandatory because necessities are scarce.

“The basic thing is soap and water equipment,” he said. “It’s difficult to provide to each household.”

Stopping disease in such conditions “will last longer than all epidemiological forecasts,” said Jerry-Jonas Mbasha, the cluster coordinator here for the World Health Organization.

Those who live in camp tents, which are often made from branches and blue tarp, usually line up at pumps with plastic jugs for water. The process can take hours. Thirst is brutal in the 90-degree heat.

News on the radio used to focus on the conflict. Now government officials urge listeners to wash their hands often and give each other space.

That’s an enormous ask, said Moumouni Sawadogo, 49, another runaway who stays in a two-room house with 20 people. His family has to buy water, he said, “and we don’t have enough money.”

Nearly 2 million people in Burkina Faso lack running water near their homes, according to Oxfam International.

Refill trips are hazardous. The extremists could strike at any moment.

“It’s like a prison here,” Sawadogo said.

Ninety miles south, in Ouagadougou, the government grapples with mounting problems. Cases are spiking in the city, which, until recently, was seen as one of the nation’s safest places.

Hunger is rampant. Crucial funds for health care and defense are depleted.

Henry Wilkins for The Washington Post

Soldiers and police officers, overburdened from the nation’s four-year insurgency, now split their time between protecting the streets from extremists and clearing away citizens after curfew.

A 16-year-old boy, who spoke on the condition of anonymity because he feared retaliation, said uniformed men with whips surrounded him one March night after he set off to meet friends. He hadn’t been sure that the curfew was real.

“They just started beating me,” he said, showing a reporter cuts on his shoulders and the skin above his eyebrows. A spokesman for the government, which is overseeing the curfew enforcement effort, did not respond to requests for comment.

After dark on a recent Wednesday, people hid from patrol cars in Ouagadougou’s maze of concrete walls and narrow alleys. Dogs picked at meat on the normally packed boulevards.

Pickup trucks crawled through neighborhoods. Officers sat in the back with automatic weapons, scanning the horizon for threats new and old.

Paquette reported from Washington.