The northeastern part of the country where the epidemic has struck has been a conflict zone for decades, with more than 100 armed groups, as well as security forces posing a constant threat of violence to the population.

Distrust of outsiders is entrenched, and grew in two areas, Beni and Butembo, after the government barred residents there from voting in the long-delayed elections in December, supposedly because of concerns about the spread of Ebola. Many people thought the government had used the disease as an excuse to keep them from voting, and some of their anger turned against the outside groups that had drawn so much attention to Ebola.

Recent attacks on two treatment centers operated by Doctors Without Borders led the group to close them, and brought a scorching and highly unusual self-assessment by Dr. Liu, who included her organization among those that had fallen short. She urged medical teams to treat Ebola patients “as humans and not as a biothreat.”

She blamed not the communities, but the responders, for failing to win people’s trust.

“They hear constant advice to wash their hands, but nothing about the lack of soap and water,” Dr. Liu said. “They see their relatives sprayed with chlorine and wrapped in plastic bags, buried without ceremony. Then they see their possessions burned.”

In a piercing essay published on Thursday in The New England Journal of Medicine, another physician from Doctors Without Borders, Dr. Vinh-Kim Nguyen, wrote: “Early in the epidemic, we witnessed armed agents forcibly bringing patients in for treatment. In a population already traumatized by violence and forceful responses to numerous crises, such tactics fuel distrust of responders, which prompts patients to flee and spawns violence.”

Dr. Nguyen also noted that when Ebola teams were accompanied by security forces, they were met with fear and distrust, especially of forced vaccination. But when the security forces were absent, people would actually ask to be vaccinated.

“The lesson is clear: Guns and public health don’t mix,” he wrote.

Dr. Liu said aid groups needed to offer help in ways the community would accept, even if it meant helping families to safely care for Ebola patients at home, or giving them information and equipment to carry out safe burials on their own .