Nigeria has been declared officially free of Ebola after six weeks with no new cases, the World Health Organization (WHO) says.
WHO representative Rui Gama Vaz, speaking in the capital Abuja, said it was a “spectacular success story”.
Nigeria won praise for its swift response after a Liberian diplomat brought the disease there in July.
The outbreak has killed more than 4,500 people in West Africa, mostly in Liberia, Guinea, and Sierra Leone.
An estimated 70% of those infected have died in those countries.
The WHO officially declared Senegal Ebola-free on Friday.
The WHO can declare an Ebola outbreak over if two incubation periods of 21 days pass with no new cases. The last reported case in Nigeria – Africa’s most populous country – was discovered on 5 September.
“The virus is gone for now. The outbreak in Nigeria has been defeated,” WHO Nigerian representative Rui Gama Vaz said on Monday.
“This is a spectacular success story that shows to the world 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.”
The BBC’s Will Ross in Lagos says the nightmare scenario of Ebola spreading through Nigeria’s 170 million people has been avoided and the nation is heaving a collective sigh of relief.
The outbreak there began when Patrick Sawyer, an American-Liberian citizen, was diagnosed with the illness in July.
Nigeria declared a national public health emergency and Mr Sawyer later died of the disease, followed by seven Nigerians.
These included Dr Ameyo Stella Adadevoh, who diagnosed Mr Sawyer and is credited with helping to contain the outbreak at its source.
Dr Adadevoh’s son, Bankole Cardoso, told the BBC that because Mr Sawyer had been so quickly diagnosed, Nigeria was able to trace all those who could possibly have contracted the disease from him.
“That was probably the difference between us and our West African neighbours,” he said.
John Vertefeuille, from the US Centers for Disease Control and Prevention (CDC), said that Nigeria had taken the right steps to contain the outbreak.
“Nigeria acted quickly and early and on a large scale,” he told AFP news agency. “They acted aggressively, especially in terms of contact-tracing,” he added.