Ebola had spread from a dying Liberian-American, Patrick Sawyer, to 19 other people in Lagos, a city of 21 million people.
Despite Nigeria being a transport hub for western Africa, with the ebola epidemic out of control in countries a few hundred miles away, it has now managed to contain the outbreak.
Africa’s most populous country has now been clear of the virus for 42 days, so can be considered “free” of the disease.
The World Health Organisation (WHO) said it was a “spectacular success story”.
Hero doctors
Dr Ameyo Stella Adadevoh is the doctor credited with helping prevent the disease spreading much more widely at the early stages.
She and her colleagues quickly identified a victim who came to Nigeria as having Ebola and placed him in quarantine.
Without any help from the national government, and little knowledge of the disease, Adadevoh set up precautions to disinfect the hospital, quickly educate staff, and ran part of the hospital as an isolation unit.
She and the hospital refused to release the patient despite what doctors described as “intense pressure” to allow him to attend a meeting of regional governments.
Dr Adadevoh, whose great-grandfather was a founder of the modern Nigeria, died on 19 August, having herself contracted the disease.
Her son told the Guardian newspaper: “If anything comes of this, all we want is an improvement in healthcare, especially public healthcare, in Nigeria.”
How Nigeria beat Ebola
The lessons from Nigeria are not immediately replicable across Liberia, Guinea and Sierra Leone, but its outbreak can provide a model for the rest of the world.
After the patient was bought to a hospital, staff initially suspected malaria, and a number contracted the disease themselves treating the patient.
But after Dr Adadevoh controlled the local outbreak, international organisations acted quickly. The American Centers for Disease Control’s experts had already trained 100 local doctors and assigned 40 to Ebola.
These doctors led an enormous effort to trace anyone who had come into contact with people who had had the disease.
Local health workers made 18,500 visits to take the temperature of 894 such people. Those living near these households were also checked.
A Bill and Melinda Gates Foundation emergency command centre, created to fight polio, became an emergency operation centre for Ebola.
As a result of all of this work, there have been only 19 cases and eight deaths in the country.
John Vertefeuille, from the US Centers for Disease Control and Prevention (CDC) told AFP: “Nigeria acted quickly and early and on a large scale. They acted aggressively, especially in terms of contact-tracing.”
Senegal, which is much closer to the countries particularly badly affected, was also declared Ebola free on Friday.
Its government similarly reacted very quickly, and identified 74 people who had close contact with the patient, who travelled by road from Guinea.