In what health officials said was a major victory in the fight to rid the world of polio, the paralysing disease has been declared to be no longer endemic in Nigeria.

The announcement by the World Health Organisation (WHO) means there are now only two countries in the world where the disease remains rife – Afghanistan and Pakistan. The disease can be prevented by simple vaccination.

“The outstanding commitment and efforts that got Nigeria off the endemic list must continue, to keep Africa polio-free. We must now support the efforts in Pakistan and Afghanistan so they soon join the polio-free world,” said Dr Margaret Chan, Director-General of the WHO.

The WHO said that as recently as 2012, Nigeria accounted for more than half of all polio cases worldwide. Since then, a concerted effort by government, civil society, religious leaders and tens of thousands of health workers have resulted in Nigeria successfully stopping polio.

“We Nigerians are proud today,” said Dr Ado Muhammad, executive director National Primary Health Care Development Agency, Nigeria.

“With local innovation and national persistence, we have beaten polio. We know our vigilance and efforts must continue in order to keep Nigeria polio-free.”

Only Afghanistan and Pakistan remain on the list of countries where the disease, which can cause life-long paralysis, is endemic. Officials said new efforts would now be focussed on those two countries. India was declared polio free in 2014.

The UN health agency said in a statement late on Friday that no new cases of the disease have been reported in the past 12 months. The last case of wild polio virus was recorded in Nigeria's impoverished north on 24 July 2014 – allowing officials to declare it free of endemic polio.

WHO says the country and Africa as a whole are now closer than ever to being certified polio-free.

The agency said polio remains endemic in Pakistan and Afghanistan and warned that as long as the disease exists anywhere “it’s a threat to children everywhere”.

Afghanistan and Pakistan have made huge efforts to tackling the disease but a combination of lack of education, cultural mistrust and some unanticipated events connected to the finding and killing of Osama Bin Laden have meant the fight is far from won.

Polio vaccination workers in Pakistan, most of them women, have been repeatedly targeted, apparently by the Taliban. The militants have prevented polio workers reaching large swathes of the remote tribal areas that border Afghanistan. Hundreds of thousands of youngsters have missed out on getting the vaccine.

Some remote communities in Pakistan have long been suspicious of visiting doctors and vaccination teams. Many believe conspiracy theories that the vaccinators are part of a Western plot to sterilise Muslims.

Yet the situation has got appreciably more difficult following the 2011 US operation to locate and kill Osama Bin Laden. In the aftermath of the operation it emerged the CIA had recruited a Pakistani doctor to organise a fake vaccination drive to try and obtain a DNA sample from the children living inside the al-Qa'ida leader's Abbottabad compound.

The doctor, Shakil Afridi, was later charged with treason and sentenced to jail for 33 years.

Yet Nigeria also once struggled against similar problems and in 2003 some northern states boycotted the oral polio vaccine for nearly a year after scare stories that it caused sterilisation, according to the BBC.

It led to the virus spreading to many countries that had been declared polio free. In 2013 nine vaccinators were shot dead in Kano. But instead of being a deterrent, it galvanised support at every level.

The Nigerian government declared polio a national health emergency and greatly increased the number of vaccinators. Community and religious leaders voiced their support.

And just as health teams in Pakistan and Afghanistan have struggled to do their work in the presence of the Taliban, in Nigeria teams have had to work despite the Islamic insurgency in the north-east led by Boko Haram. Earlier this month Unicef said half a million children had fled attacks by Boko Haram over the past five months.

At a press conference in New York this week, Melinda Gates, co-chair of the Bill and Melinda Gates Foundation, one of the major donors in the battle against polio, said success against the disease underscored the need to share experiences and expertise.