This is an achievement with lessons for countries still struggling to contain the deadly virus.
“This is a spectacular success story,” WHO representative Rui Gama Vaz told a news conference in the capital Abuja, where officials broke into applause when he announced that Nigeria had shaken off the disease.
“It shows that Ebola can be contained, but we must be clear that we have only won a battle, the war will only end when West Africa is also declared free of Ebola.”
This year’s Ebola outbreak, the worst on record, has killed 4,546 people across the three most-affected countries, Liberia, Guinea and Sierra Leone.
Its arrival in Lagos, an overcrowded city of 21 million people, sparked fears of a doomsday scenario in which it becomes impossible to contain because contacts are too diffuse to trace.
(READ MORE: Ebola screening compulsory at Nigeria’s entry points)
As the commercial hub of Africa’s most populous nation, largest economy and leading energy producer, it would have been an ideal springboard for Ebola to spread across the country.
The first case in Nigeria was imported from Liberia when Liberian-American diplomat Patrick Sawyer collapsed at the main international airport in Lagos on 20 July.
Authorities were caught unawares, airport staff were not prepared and the government had not set up any hospital isolation unit, so he was able to infect several people, including health workers in the hospital where he was taken.
But they acted fast after the doctor on duty, who later herself died of the disease, quarantined him in the hospital against his will and contacted officials.
“Nigeria was not really prepared for the outbreak, but the swift response from the federal government, state governments (and) international organisations ... was essential,” said Samuel Matoka, IFRC Ebola operations manager for Lagos.
“The swiftness and fastness of the reaction from all parties, helped to contain Ebola in Nigeria.”
HOW NIGERIA DID IT
Doctor Ameyo Adadevoh at the First Consultants hospital in Lagos where Sawyer was first brought kept him in the hospital despite his protests and those of the Liberian government, preventing the dying man from spreading it further, Benjamin Ohiaeri, a doctor there who survived the disease, told Reuters.
Ebola is much more contagious once symptoms become severe.
“We agreed that the thing to do was not to let him out of the hospital,” Ohiaeri said, even after he became aggressive and demanded to be set free.
“If we had let him out, within 24 hours of being here, he would have contacted and infected a lot more people ... The lesson there is: stand your ground.”
Once the hospital contacted the ministries of health in the state of Lagos and the federal ministry in Abuja, authorities quickly set up and equipped an isolation unit.
Lagos state governor Babatunde Fashola rushed back from a pilgrimage to Mecca to handle the crisis, Ohiaeri said.
“Everyone played their part. We’re so proud,” Ohiaeri said.
Even when the virus found its way to the oil hub of Port Harcourt in the southeast, authorities were able to quickly contain it, an example WHO said others should be able to follow.
“If a country like Nigeria, hampered by serious security problems, can do this ... any country in the world experiencing an imported case can hold onward transmission to just a handful of cases,” WHO Director Margaret Chan said in a statement.
Nigeria’s success in preventing the spread of the disease contrasts with its slower and more fractious response to crises such as the kidnapping in April of more than 200 girls still being held by Islamist militant group Boko Haram.
(READ MORE: Nigeria says reaches deal with Boko Haram over abducted girls)
“The approach to Ebola was pragmatic, patriotic and non-partisan,” said Lagos-based political analyst and lawyer Emekanka Onyebuchi. “They put the nation first and this is what we should have done in other areas, like the (kidnapped) girls.”
The announcement that Nigeria has, for now at least, stamped out the deadly haemorrhagic fever, follows a similar declaration in much smaller Senegal, where one case was imported from Guinea.
Officials hope such success stories will change the way the West, where many are currently in the grip of a panic about a disease brought to their shores from “Africa”, sees the crisis.
“There is focus on the worst-case scenarios, which again perpetuate the wrong, negative image of Africa as opposed to looking at some of the areas where there has been success,” Abdul Tejan-Cole, a Sierra Leonean who is executive director of the Open Society Initiative for West Africa.