Some glimmers of hope are emerging in the global fight against the monkeypox epidemic. Weekly case counts are trending down: 6,000 were reported from 15 to 21 August, an improvement over the 7,500 reported from 8 to 14 August. These gains are thanks to concerted efforts by public-health officials and advocates globally to extend vaccination, testing and educational messaging to men who have sex with men, the subpopulation currently at highest risk of infection.

However, a major risk now is that, as the epidemic wanes, so too will the response.

A cycle of panic and neglect shadows public health: frenzied action tends to be followed by loss of interest as a threat recedes. See, for example, the reemergence of vaccine-preventable diseases such as polio. Public-health officials, governments and advocates must not let that impulse prevail again as case counts decrease and we move into the next phase of the monkeypox epidemic.

As an infectious-disease epidemiologist specializing in epidemics and pandemics at the Johns Hopkins Bloomberg School of Public Health in Baltimore, Maryland, I have studied many public-health victories over pathogens. The 2003 severe acute respiratory syndrome (SARS) pandemic saw at least 8,422 cases in 29 countries — probably a drastic undercount, given that diagnostic testing was not available at the time. Although the virus had several months’ head start, epidemiologists were able to detect and break chains of transmission through contact tracing, quarantine and isolation. The SARS virus killed an estimated 11% of those infected. Had epidemiologists and their public-health colleagues not cut off transmission, many more people would have died.

A similar success was secured in 2014, when an outbreak of Ebola in West Africa grew to almost 30,000 cases across three countries. The devastating Ebola virus disease kills, on average, 50% of the people it infects — and, at the time of the outbreak, there were no specific treatments or vaccines. Once again, public-health officials used the time-honoured tools of contact training, quarantine and isolation, along with intensive education and supported behavioural change, to extinguish the outbreak. In the Democratic Republic of the Congo, experienced public-health officials routinely bring new Ebola outbreaks under control.

The global public-health community must fortify its resolve to beat back monkeypox, just as it did SARS and Ebola. The virus has already infected tens of thousands of people and has footholds in communities around the world. Until this year, monkeypox circulated only in limited outbreaks in endemic regions of West and Central Africa. It should not be allowed to establish a permanent beachhead in new places now.

In most of the world, ending the outbreak means eliminating the virus. In areas where monkeypox circulates in animals, it means ending sustained human-to-human transmission and preparing for rapid containment of new human infections.

Although this is an ambitious goal that might take years to achieve, all the tools needed to contain monkeypox already exist. To succeed, public-health officials will need to continue to vaccinate the populations at risk. Decisions last month by health authorities in the United Kingdom to delay second doses and in the United States to implement a dose-sparing strategy will help to extend supply.

But vaccines are not the only option for breaking chains of transmission. Just as interventions such as contact tracing, quarantine and isolation brought SARS and Ebola under control, so too can they slow monkeypox. Epidemiologists in the United Kingdom reported in May that people exposed to the virus often could not be reached, a challenge that is probably common across countries. This should not deter contact-tracing efforts; even partial success will contribute to reducing transmission.

Finally, public-health officials should not shy away from direct messaging to help members of the public protect themselves — which includes making it clear that the population currently at highest risk is men who have sex with men — and providing guidance on preventing infection and recognizing symptoms.

Success will depend on ensuring that all affected countries have access to the tools needed to end transmission. For too long, outbreaks in low-resource settings have not received the attention and resources required to mount effective responses. That is certainly true in the case of monkeypox: epidemiologists in the Democratic Republic of the Congo and Nigeria have warned for years of an increase in infections, including an increase in transmission linked to sexual contact. To end this outbreak and prevent future ones from growing out of control, vaccines, therapeutics, testing and expertise must be shared broadly to power a robust and coordinated response.

The monkeypox epidemic comes at a time when public-health officials around the world are stretched thin. Early efforts to slow transmission are working — but they are not enough. The global community must steel its resolve to pursue the virus until transmission has been stopped. Medical countermeasures, case-based interventions and goal-oriented metrics and targets can help to ensure we get there, but only if they are implemented aggressively and equitably.