Nigeria will be officially declared Ebola-free in less than a week after containing the disease that has killed more than 4,000 people.

Eight of the 20 people infected in the country died and there have been no new cases confirmed since 8 September.

It means it is less than a week short of the 42-day period needed by the World Health Organisation (WHO) to confirm Nigeria has quashed its Ebola outbreak.

President Goodluck Jonathan was premature when he told the UN General Assembly “Nigeria is Ebola free” last month but his government’s response has been watched around the world.

The outbreak started in July, when a Liberian-American development consultant, Patrick Sawyer, collapsed in the arrivals hall of Lagos airport.

By the time he was diagnosed with Ebola, he had exposed his 72 fellow plane passengers, the airport and hospital patients to the highly infectious disease.

The conditions seemed ripe for it to spread through the densely-populated city of 21 million people and beyond, through the workers travelling in and out of Lagos every day and international travellers flying from its airport around the world.

But Nigeria was ready – Ebola had already killed more than 400 people and was spreading through Sierra Leone, Guinea and Liberia.

Knowing the potential of Mr Sawyer’s symptoms, staff at the clinic caring for him refused to let him leave despite alleged pressure from the Liberian ambassador.

Staff at the First Consultants Medical Centre paid a high price for their courage – 11 workers and their family members contracted Ebola and four died.

Dr Benjamin Ohiaeri, the director of the clinic, told a Nigerian newspaper two doctors with a combined 37 years of service were killed as well as a nurse who was raising her four children alone after her husband died.

The fourth staff member who died had started working at the clinic on the day Mr Sawyer was brought in. She was two months pregnant at the time.

As the clinic battled to treat Mr Sawyer, who later died, and its own staff, Nigerian authorities started tracing anyone who had contact with the Ebola patients.

A secondary school principal checks a student's temperature for ebola symptoms during an assembly in Abuja (AFP/Getty Images)

An emergency presidential decree enabled officials to access mobile phone records and use law enforcement agencies where necessary to track down people at risk.

Almost 900 people - 362 in Lagos and 529 in Port Harcourt – were traced and monitored for symptoms for 21 days to ensure they had not contracted Ebola.

Every one of those people had to provide health authorities with updates about their health twice a day, often through methods like text messaging.

Anyone who didn't feel well or failed to respond was checked on, either through a neighbourhood network or health workers.

In pictures: Ebola virus Show all 62 1 /62 In pictures: Ebola virus In pictures: Ebola virus Ebola virus A health worker from Sierra Leone's Red Cross Society Burial Team 7 carries the corpse of a child in Freetown In pictures: Ebola virus Ebola virus A health workers from the Sierra Leone's Red Cross Society Burial Team 7 is sprayed with desinfectant after removing a corpse from a house in Freetown In pictures: Ebola virus Ebola virus Health workers from Sierra Leone's Red Cross Society Burial Team 7 prepare to remove a body from a house in Freetown AFP In pictures: Ebola virus Ebola virus Health workers from the Sierra Leone's Red Cross Society Burial Team 7 place a body in a grave at King Tom cemetary in Freetown In pictures: Ebola virus Ebola virus Mustapha Rogers of the Red Cross talks as health workers from the Sierra Leone's Red Cross Society Burial Team 7 remove a corpse from a house in Freetown In pictures: Ebola virus Ebola virus A citizen from Mali arrives at a hospital in Murcia city, south-eastern Spain. The protocol for a possible case of Ebola has been activated as the man, who arrived from Mali to Jumilla town in Murcia province five days ago, presents clinical symptoms of high fever and vomiting EPA In pictures: Ebola virus Ebola virus Kenyan medical workers show how to handle an infected Ebola patient on a portable negative pressure bed at the Kenyatta national hospital in Nairobi Getty Images In pictures: Ebola virus Ebola virus A health worker sprays disinfectant onto a college in Monrovia, Liberia AP In pictures: Ebola virus Ebola virus A burial team in protective gear bury the body of a woman suspected to have died from Ebola virus in Monrovia, Liberia In pictures: Ebola virus Ebola virus Healthcare workers in protective gear work at an Ebola treatment center in the west of Freetown, Sierra Leone AP Photo/Michael Duff In pictures: Ebola virus Ebola virus A healthcare worker in protective gear is sprayed with disinfectant after working in an Ebola treatment center in the west of Freetown, Sierra Leone In pictures: Ebola virus Ebola virus A member of the NGO U Fondation leaves a house after visiting quarantined family members suffering from the Ebola virus in Monrovia In pictures: Ebola virus Ebola virus An Ebola sign placed infront of a home in West Point slum area of Monrovia, Liberia In pictures: Ebola virus Ebola virus A Liberian man carries his sick brother suspected of having Ebola after being delayed admission to the Island Clinic Ebola Treatment Unit due to a lack of beds at the clinic on the outskirts of Monrovia, Liberia In pictures: Ebola virus Ebola virus Health workers remove the body a woman who died from the Ebola virus in the Aberdeen district of Freetown, Sierra Leone In pictures: Ebola virus Ebola virus A health worker fixes another health worker's protective suit in the Aberdeen district of Freetown, Sierra Leone In pictures: Ebola virus Ebola virus Health workers spray themselves with chlorine disinfectants after removing the body a woman who died of Ebola virus in the Aberdeen district of Freetown, Sierra Leone In pictures: Ebola virus Ebola virus A woman crawls towards the body of her sister as Ebola burial team members take her sister Mekie Nagbe (28) for cremation in Monrovia, Liberia In pictures: Ebola virus Ebola virus Sophia Doe sits with her grandchildren Beauty Mandi, 9 months (L) and Arthuneh Qunoh, 9, (R), while watching the arrival an Ebola burial team to take away the body of her daughter Mekie Nagbe, 28, for cremation in Monrovia, Liberia In pictures: Ebola virus Ebola virus Varney Jonson (46) grieves as an Ebola burial team takes away the body of his wife Nama Fambule for cremation in Monrovia, Liberia In pictures: Ebola virus Ebola virus Family members grieve as Ebola burial team members prepare to remove the body of Nama Fambule for cremation in Monrovia, Liberia In pictures: Ebola virus Ebola virus A Liberian burial squad carry the body of an Ebola victim in Marshall, Margini county, Liberia In pictures: Ebola virus Ebola virus An Ebola burial team dresses in protective clothing before collecting the body of a woman (54) from her home in the New Kru Town suburb of Monrovia, Liberia In pictures: Ebola virus Ebola virus An Ebola burial team carries the body of a woman (54) through the New Kru Town suburb of Monrovia, Liberia In pictures: Ebola virus Ebola virus An Ebola burial team dresses in protective clothing before collecting the body of a woman (54) from her home in the New Kru Town suburb of Monrovia, Liberia In pictures: Ebola virus Ebola virus Health workers in protective gear carry the body of a woman suspected to have died from Ebola virus, from a house in New Kru Town at the outskirt of Monrovia, Liberia In pictures: Ebola virus Ebola virus Volunteers in protective suit bury the body of a person who died from Ebola in Waterloo, some 30 kilometers southeast of Freetown FLORIAN PLAUCHEUR/AFP/Getty Images In pictures: Ebola virus Ebola virus Nowa Paye (9) is taken to an ambulance after showing signs of the Ebola infection in the village of Freeman Reserve, about 30 miles north of Monrovia, Liberia In pictures: Ebola virus Ebola virus Medical staff members burn clothes belonging to patients suffering from Ebola, at the French medical NGO Medecins Sans Frontieres (MSF) in Monrovia PASCAL GUYOT/AFP/Getty Images In pictures: Ebola virus Ebola virus A medical staff member wearing a protective suit walks past the crematorium where victims of Ebola are burned in Monrovia In pictures: Ebola virus Ebola virus A Liberian burial team wearing protective clothing loads the body of a 60-year-old Ebola victim after retrieving him from his home Getty Images In pictures: Ebola virus Ebola virus Sick women rest while hoping to enter the new Doctors Without Borders (MSF), Ebola treatment center near Monrovia, Liberia Getty Images In pictures: Ebola virus Ebola virus Hanah Siafa walks in the rain with her children Josephine, 10, and Elija, six, while waiting to enter the new Doctors Without Borders (MSF), Ebola treatment center in Monrovia, Liberia Getty Images In pictures: Ebola virus Ebola virus UNICEF health workers walk through the streets, going house to house to speak about Ebola prevention in New Kru Town, Liberia. The virus has killed more than 1,000 people in four African countries Getty Images In pictures: Ebola virus Ebola virus Local residents watch as public health advocates stage an Ebola awareness and prevention event in Monrovia, Liberia Getty Images In pictures: Ebola virus Ebola virus Public health advocates stage an Ebola awareness and prevention event in Monrovia, Liberia. The Liberian government and international groups are trying to convince residents of the danger and are urging people to wash their hands to help prevent the spread of the epidemic Getty Images In pictures: Ebola virus Ebola virus Hanah Siafa lies with her children Josephine, 10, and Elija, six, while hoping to enter the new Doctors Without Borders (MSF), Ebola treatment center Getty Images In pictures: Ebola virus Ebola virus A health worker examines patients for Ebola inside a screening tent, at the Kenema Government Hospital AP In pictures: Ebola virus Ebola virus A health worker cleans his hands with chlorinated water before entering an Ebola screening tent at the Kenema Government Hospital, about 86 miles from Sierra Leone’s capital Freetown AP In pictures: Ebola virus Ebola virus Aid workers and doctors transfer Miguel Pajares, a Spanish priest who was infected with the Ebola virus while working in Liberia, from a plane to an ambulance as he leaves the Torrejon de Ardoz military airbase, near Madrid, Spain AP Photo/Spanish Defense Ministry In pictures: Ebola virus Ebola virus A Liberian money exchanger washes hands between customers as a precaution to prevent infection with the deadly Ebola virus while conducting business in downtown Monrovia, Liberia EPA In pictures: Ebola virus Ebola virus A Liberian health worker sprays disinfectant on a drivers boots to stop the spread of the deadly Ebola virus at the Christian charity Samaritan Purse head offices in Monrovia, Liberia. Over 660 people have died of Ebola in West Africa in 2014 making it the world's deadliest outbreak to date according to statistics from the World Health Organisation EPA In pictures: Ebola virus Ebola virus A Liberian taxi driver wears protective gloves as a precaution to prevent infection with the deadly Ebola virus whilst driving in downtown Monrovia, Liberia. Many Liberians have taken to wearing gloves and washing hands after every interaction in an attempt to curb the spread of the deadly virus EPA In pictures: Ebola virus Ebola virus A Liberian money exchanger wears protective gloves as a precaution to prevent infection with the deadly Ebola virus while transacting business with customers in downtown Monrovia, Liberia EPA In pictures: Ebola virus Ebola virus A woman from Liberia takes food to a sick relative in the Ebola isolation unit at the ELWA Hospital where US doctor Kent Bradley is being quarantined having contracted the Ebola virus. Over 660 people have died of Ebola in West Africa in 2014 making it the world's deadliest outbreak to date according to statistics from the World Health Organisation EPA In pictures: Ebola virus Ebola virus The disease has now spread to Liberia and, for the first time, Sierra Leone and Nigeria, killing at least 672 people in 1,201 cases, according to the World Health Organisation’s latest figures AP In pictures: Ebola virus Ebola virus Health specialists prepare for work in an isolation ward for patients at the Medecins Sans Frontieres facility in southern Guinea AFP/Getty Images In pictures: Ebola virus Ebola virus A Liberian street vendor wears protective gloves as a precaution to prevent infection with the deadly Ebola virus while transacting business with customers in downtown Monrovia, Liberia EPA In pictures: Ebola virus Ebola virus A nurse from Liberia sprays preventives to disinfect the waiting area for visitors at the ELWA Hospital where a US doctor Kent Bradley is being quarantined in the hospitals isolation unit having contracted the Ebola virus, Monrovia, Liberia EPA In pictures: Ebola virus Ebola virus Staff of the 'Doctors without Borders' ('Medecin sans frontieres') medical aid organisation carry the body of a person killed by the virus In pictures: Ebola virus Ebola virus A Liberia man (right) talks to a nurse (left) about the health of his relative who is in the isolation unit of the ELWA Hospital where a US doctor Kent Bradley is being quarantined having contracted the Ebola virus, Monrovia, Liberia EPA In pictures: Ebola virus Ebola virus A nurse from Liberia walks to spray preventives to disinfect the waiting area for visitors at the ELWA Hospital where a US doctor Kent Bradley is being quarantined in the hospitals isolation unit having contracted the Ebola virus EPA In pictures: Ebola virus Ebola virus Staff of the Christian charity Samaritan's Purse put on protective gear in the ELWA hospital in the Liberian capital Monrovia AFP In pictures: Ebola virus Ebola virus Lagos State Health Commissioner Jide Idris, speaks, during a news conference in Lagos, Nigeria. No one knows for sure just how many people Patrick Sawyer came into contact with the day he boarded a flight in Liberia, had a stopover in Ghana, changed planes in Togo, and then arrived in Nigeria, where authorities say he died days later from Ebola AP Photo/Sunday Alamba In pictures: Ebola virus Ebola virus Staff of the Christian charity Samaritan's Purse put on protective gear in the ELWA hospital in the Liberian capital Monrovia. An American doctor battling West Africa's Ebola epidemic has himself fallen sick with the disease in Liberia, Samaritan's Purse said AP In pictures: Ebola virus Ebola virus Protective gear including boots, gloves, masks and suits, drying after being used in a treatment room in the ELWA hospital in the Liberian capital Monrovia AFP In pictures: Ebola virus Ebola virus A Liberian man holding a Civet being sold on a roadside as bush meat in Lofa County. Bush meat is one of the major carriers of the Ebola virus. The Liberian government and International partners have warned people to not eat it. The World Health Organisation (WHO) reported that a total of 888 Ebola cases including 539 deaths have been recorded in West Africa since February AFP In pictures: Ebola virus Ebola virus People unload protection and healthcare material at Conakry's airport, to help fight the spread of the Ebola virus and treat people who have been already infected AFP/Getty Images In pictures: Ebola virus Ebola virus Body of evidence: health workers transport a casket of a nun whose death resulted from an Ebola infection in Zaire in 1995 Getty In pictures: Ebola virus Ebola virus Peter Piot in Yambuku, northern Congo (then Zaire), in 1976, where he was part of the original team to discover the Ebola virus J Breman In pictures: Ebola virus Ebola virus A member of Doctors Without Borders helps to unload protection and healthcare materials in Guinea Getty In pictures: Ebola virus Ebola virus Doctors in protective gear work inside the Medecins Sans Frontieres isolation ward as Guinea faced the worst ever outbreak of the Ebola virus Getty Images

Nigeria’s Port Health Services worked with airlines to ensure outbreak notifications were made and the Ministry of Health activated an Ebola Incident Management Centre to lead the national response.

The Lagos state government, federal institutions, the private sector and global non-governmental organisations were all drawn in to control the outbreak and the operation seems to have been a success.

Dr Tom Frieden, director of the US Centers for Disease Control and Prevention, praised Nigeria’s response.