The global drive to eliminate polio, which has gone on for 31 years and consumed over $16 billion, has been set back again by a surge of new cases in Pakistan and Afghanistan.

As of July 10, there were a total of 42 polio paralysis cases in the two countries. They comprise a single large outbreak because most cases are in the tribal areas along the border, where local people easily cross back and forth.

Pakistan had 32 of the cases, compared with only three by the same date last year, and the situation is expected to get worse because hot summer weather favors the virus. There were only 12 cases in the country in 2018 and eight in 2017.

For each paralyzed victim — usually a child under 5 — there are about 200 others who are infected and shedding the virus in their stool, the World Health Organization estimates.

About 20,000 children are born each day in Pakistan. In cities with open sewers, and where other pathogens may attach to the same intestinal receptors that the vaccine does, it can take many doses to fully immunize a child.

Last year's hotly contested national elections temporarily threw the program off track as local officials were replaced, said Aziz Memon, head of Rotary International's polio campaign in Pakistan. Cases have typically spiked during elections and moments of political turmoil, according to an article in the Diplomat, a current affairs magazine focused on Asia.

Earlier this year, Pakistan announced that it would streamline its national vaccination drive in June in order to make the campaigns faster and less intrusive. Teams would try a friendlier approach and gather less data on the families they visited, the prime minister's office said.

But false rumors spread on social media saying the vaccine had triggered fainting spells — or even that it had killed dozens of children — and many families locked their doors to vaccinators or hid their children.

The issue has split families; the Times of London recently described a Pakistani man returning from work and divorcing his wife on the spot after finding their children's fingers marked with the indelible ink used by polio vaccinators. Islamic law allows a man to end a marriage by merely saying "I divorce you" three times; he threw his wife and children out of the house.

As in other countries, vaccines have become politicized, with opposition parties spreading anti-vaccine rumors.

The virus is threatening to spread to other countries. In May, a sewage sample in a bordering province in Iran tested positive for the strain of virus circulating in Pakistan; Iran had its last case in 2001.

A further threat to the eradication campaign is that a few countries — mostly in Africa — have been unable to eliminate some mutated strains of the polio viruses used in live vaccines. Those strains have reverted back into forms capable of causing paralysis.

In the last two years, there have been outbreaks of "vaccine-derived polio" in Angola, the Democratic Republic of Congo, Ethiopia, Indonesia, Mozambique, Niger, Nigeria, Papua New Guinea and Somalia. Last week, a sewage sample in western China tested positive for a vaccine-derived polio strain.

Xinjiang, the province where it was found, borders on both Pakistan and ­Afghanistan.