A measles epidemic in Samoa has killed 39 people, with the World Health Organization (WHO) blaming an anti-vaccine messaging campaign for leaving the Pacific island nation vulnerable to the spread of the virus.

The UN health agency warned that a steep decline in vaccination rates in Samoa had paved the way for a “huge outbreak”, with almost 3,000 in a country of just 200,000 people.

The death toll has been rising steadily since the country declared a national measles epidemic in mid-October. The Samoan government released an update on Wednesday that confirmed the death toll had risen to 39, with 35 of those deaths children under the age of four.

Measles is caused by a virus and can lead to serious complications including pneumonia and inflammation of the brain that can cause permanent damage and be deadly, especially in small children.

Kate O’Brien, director of the WHO’s immunisation department, said in Geneva that “very low coverage of measles vaccine” was to blame for the rapid spread of the highly contagious in the country.

In 2018, only 31% of children under five had been immunised, she said. “When measles enters a country like that, there is a huge group of people who are not immune,” she said.

The tragedy, she said, was that immunisation rates used to be far higher in Samoa, with coverage measured at 84% just four years ago.

Officials have blamed the low rates in part on fears sparked last year when two babies died after receiving measles vaccination shots.

This resulted in the temporary suspension of the country’s immunisation programme and dented parents’ trust in the vaccine, even though it later turned out the deaths were caused by the vaccine being incorrectly prepared with other medicines.

O’Brien said that an anti-vaccine group had been stoking these fears further with a social media campaign, lamenting that “this is now being measured in the lives of children who have died in the course of this outbreak”.

Misinformation about the safety of vaccines, she said, “has had a very remarkable impact on the immunisation programme” in Samoa.

Ian Norton at WHO’s emergency medical unit meanwhile warned that the outbreak was taking a heavy toll on the small country’s entire health system. New cases had “really spiked dramatically”, he said, pointing out that more than 200 new patients arrive at hospital every day.

Apia’s main hospital, which normally has just four beds in its intensive care unit, currently has 14 children on ventilators, Norton said, stressing that this poses “a huge, huge burden”.

He said mass vaccination was the only way to rein in the epidemic.

The UN children’s agency Unicef has sent than 110,000 doses of measles vaccine and medical teams from Australia and New Zealand are helping administer them.

Norton said Britain was also preparing to send a support medical team, adding that WHO has sent out an appeal to other countries in the region to send medical teams.

• This article was amended on 5 December 2019 to clarify that the deaths of the two babies was caused by an incorrect vaccine mixture being administered, rather than as a result of an additional medicine being used