The huge, impoverished country of Mali looks like the new frontier in the fight to control the Ebola epidemic in West Africa. The virus has killed thousands in Guinea, Liberia and Sierra Leone, the three countries where the virus first emerged, but it has not gained much of a foothold elsewhere. Small outbreaks of 20 cases in Nigeria and a single case in Senegal were declared over in October. Now the potential for many more cases in neighboring Mali has health authorities scrambling to contain a small outbreak before it can get very far.

That will be challenging. At least six people have died from Ebola in Mali already, and the country’s health officials, aided by American and international advisers, are racing to find, test and isolate, if necessary, hundreds of people exposed to an infected cleric who died in Mali last month after traveling there from Guinea. Many of the people had engaged in ritual washing of the dead imam’s body, a particularly dangerous practice since the corpse is apt to be highly infectious and the mourners rarely wear protective clothing.

The dangers in Mali caused leaders in the United Nations and the World Health Organization last week to temper their earlier optimism that worst-case outcomes might be avoided if 70 percent of the dead could be buried safely and 70 percent of the sick treated by Dec. 1. Now they express doubts that the targets can be met and talk about containing the epidemic by the middle of next year.

Dr. Margaret Chan, the director general of the W.H.O., traveled to Mali on Friday to encourage health workers in the anti-Ebola effort. The United Nations said it will open an emergency response office in Mali this week, signifying its importance as the latest battleground. The next 15 days are deemed critical for ending Ebola transmission in Mali, the United Nations says.