Geneva, Switzerland: The World Health Organization (WHO) announced on Thursday that the Ebola epidemic that has ravaged west Africa for two years was over after Liberia, the last affected country, received the all-clear.

"Today the World Health Organization declares the end of the most recent outbreak of Ebola virus disease in Liberia and says all known chains of transmission have been stopped in West Africa," the UN health agency said.

AP picture.

WHO stressed though that "the job is not over," warning "more flare-ups are expected."

The announcement came 42 days -- the equivalent of two incubation periods of the virus -- after the last Ebola cases in Liberia were tested negative.

Liberia, the country worst hit by the outbreak with 4,800 deaths, discharged its last two patients from hospital -- the father and younger brother of a 15-year-old victim -- on 3 December, 2015.

The outbreak infected almost 29,000 people and claimed 11,315 lives, according to official data.

But the real toll is suspected to be much higher, with many Ebola deaths believed to have gone unreported. Fighting stigma and resistance to containment measures were among the many challenges facing Ebola workers on the front line.

Thursday marked the third time that Liberia has been given the all-clear.

The country was the first of the three to be declared free of human-to-human Ebola transmission in May, only to see the virus resurface six weeks later.

Liberia was officially credited with beating the epidemic for a second time in September before another small cluster of cases emerged.

The World Health Organization (WHO) came under fire for its sluggish response to the epidemic, which local healthcare systems were woefully underequipped to handle. Over 500 healthcare workers died in three west African countries in the eye of the outbreak.