The World Health Organization declared Nigeria free of Ebola on Monday, a containment victory in an outbreak that has stymied other countries’ response efforts.

The milestone came at about 11 a.m. local time, or 6 a.m., E.T. The outbreak has killed more than 4,500 in West Africa is remains unchecked in Liberia, Sierra Leone and Guinea, so Nigeria is by no means immune to another outbreak.

“It’s possible to control Ebola. It’s possible to defeat Ebola. We’ve seen it here in Nigeria,” Nigerian Minister of Health Onyebuchi Chukwu told TIME. “If any cases emerge in the future, it will be considered—by international standards—a separate outbreak. If that happens, Nigeria will be ready and able to confront it exactly as we have done with this outbreak.”

For the WHO to declare Nigeria as Ebola-free, the country had to make it 42 days with no new cases (double the incubation period), verify that it actively sought out all possible contacts, and show negative test results for any suspected cases.

Nigeria had 20 cases of Ebola after a Liberian-American man named Patrick Sawyer flew into Lagos and collapsed at the airport. Health care workers treating Sawyer were infected, and as it spread it ultimately killed eight people, a low number next to the thousands of cases and deaths in other countries. Nigeria’s health system is considered more robust, but there was significant concern from experts that a case would pop up in one of the country’s dense-populated slums and catch fire.

So what did Nigeria do right? Chukwu and Dr. Faisal Shuaib of the country’s Ebola Emergency Operation Center, broke it down for TIME.

Preparing early. Nigeria knew it was possible a case of Ebola would make it into the country, so officials got to work early by training health care workers on how to manage the disease, and disseminating information so the country knew what to expect.

Declaring an emergency—right away. When Nigeria had its first confirmed case of Ebola, the government declared a national public health emergency immediately. This allowed the Ministry of Health to form its Ebola Emergency Operations Center (EOC). The EOC is an assembly of public health experts within Nigeria as well as the WHO, Centers for Disease Control (CDC), and groups like Doctors Without Borders. “[We] used a war-room approach to coordinate the outbreak response,” Shuaib said. “So you have a situation whereby government and staff of international development agencies are co-located in a designated facility where they are able to agree on strategies, develop one plan and implement this plan together.”

The EOC was in charge of contact tracing (the process of identifying and monitoring people who may have had direct or indirect contact with Ebola patients), implementing strict procedures for handling and treating patients, screening all individuals arriving or departing the country by land, air and sea, and communicating with the community. Some workers went door-to-door to offer Ebola-related education, and others involved religious and professional leaders. Social media was a central part of the education response.

Training local doctors. Nigerian doctors were trained by Doctors Without Borders and WHO, and treated patients in shifts with their oversight.

Managing fear. “Expectedly, people were scared of contracting the disease,” Shuaib said. “In the beginning, there was also some misinformation about available cures, so fear and inaccurate rumors had to be actively managed.” Nigeria used social media to to ramp up awareness efforts, and publicized patients who were successfully treated and discharged. “People began to realize that contracting Ebola was not necessarily a death sentence,” Shuai said. “Emphasizing that reporting early to the hospital boosts survival gave comfort that [a person] has some level of control over the disease prognosis.”

Keeping borders open. Nigeria has not closed its borders to travelers from Guinea, Sierra Leone and Liberia, saying the move would be counterproductive. “Closing borders tends to reinforce panic and the notion of helplessness,” Shuaib said. “When you close the legal points of entry, then you potentially drive people to use illegal passages, thus compounding the problem.” Shuaib said that if public health strategies are implemented, outbreaks can be controlled, and that closing borders would only stifle commercial activities in the countries whose economies are already struggling due to Ebola.

Remaining prepared for more patients. Even though this outbreak was contained, Nigeria is not slowing down its training and preparations for the possibility of more cases. “Outbreak response preparedness is a continuous process that requires constant review of the level of the response mechanisms in place to ensure that the health system is ready to jump into action at all levels,” Shuaib said. “There is no alternative to preparedness.”

Advocating for more international response. “The global community needs to consistently come together, act as one in any public health emergency, whether it is Ebola or a natural disaster.” Shuaib said. “While a lot has been done, it still falls short of what is necessary to get ahead of the curve. We must act now, not tomorrow, not next week.”

Read next: Dozens Who Had Contact With the First U.S. Ebola Patient Are in the Clear

Contact us at letters@time.com.