* Year-long epidemic killed over 4,700 in Liberia
* Country goes 42 days without a new case
* Neighbouring Guinea and Sierra Leone still recording cases (Adds quotes from Liberia's president, health worker, details)
By Alphonso Toweh and James Harding Giahyue
MONROVIA, May 9 (Reuters) - Liberia was declared free from Ebola by the government and the World Health Organisation (WHO) on Saturday after 42 days without a new case of the virus, which killed more than 4,700 people there during a year-long epidemic.
However, celebrations were muted by thoughts for the dead and medical charity Medecins Sans Frontieres (MSF) urged vigilance until the worst outbreak of the disease ever recorded was also extinguished in neighbouring Guinea and Sierra Leone.
A total of 11,005 people have died from Ebola in the three West African neighbours since the outbreak began in December 2013, according to the WHO.
President Ellen Johnson Sirleaf, who toured Ebola treatment units in the capital Monrovia, said that, while Liberia could take pride in winning the battle against the disease, work was not finished.
"At times when you are at your worst, it is when you become your best. That was what happened to us," she said during a speech at the country's incident management centre. "The task is not yet over ... The challenge is that we stay at zero."
Monday has been decreed by the government as a day of thanksgiving. The country's Christians have been asked to pray for the dead on Sunday, with Muslims to do the same on Friday.
Liberia was recording hundreds of new cases a week at the peak of the outbreak between August and October, causing international alarm.
The United States sent in hundreds of soldiers to help build treatment clinics in a country founded by freed U.S. slaves, a move seen as a game changer in the battle to stem the disease, contracted through physical contact with sick people.
The White House welcomed the news as a milestone for Liberians but cautioned there was more work to be done in Sierra Leone and Guinea.
Also critical in Liberia was the government's national awareness campaign to educate Liberians on how to protect themselves from Ebola.
"It is a tribute to the government and people of Liberia that determination to defeat Ebola never wavered, courage never faltered," Alex Gasasira, the WHO's representative in Monrovia, said on Saturday.
MSF said that Liberia's completion of the WHO's benchmark for the end of an Ebola outbreak - 42 days without a new case, marking twice the maximum incubation period of the virus - should not lead to complacency.
"We can't take our foot off the gas until all three countries record 42 days with no cases," Mariateresa Cacciapuoti, MSF's head of mission in Liberia, said in a statement.
She urged Liberia to step up cross-border surveillance to prevent Ebola slipping back into the country.
The U.N. Special Envoy on Ebola, David Nabarro, said on Tuesday that, even though fewer than 20 new cases were reported in Guinea and Sierra Leone last week, it could take months to get to zero.
International aid organisations were forced to step in as the Ebola outbreak ravaged the region's poorly equipped and understaffed healthcare systems.
According to the WHO, a total of 868 health workers have caught the virus in Guinea, Liberia, and Sierra Leone since the start of the outbreak, of whom 507 died.
"We are not afraid," health worker Nathaniel Dovillie said at the event with President Sirleaf. "We are also now in a preparatory stage to be able to meet up with this challenge just in case its comes back." (Additional reporting by Derick Snyder in Monrovia and Doina Chiacu in Washington; Writing by Daniel Flynn and Joe Bavier; Editing by Larry King and Clelia Oziel)