BERLIN (AP) — The Bill and Melinda Gates Foundation says it will commit $1.2 billion to the effort to end polio worldwide.

The money will be used to help implement the Global Polio Eradication Initiative’s strategy through 2026. The initiative is trying to end the polio virus in Pakistan and Afghanistan, the last two endemic countries, the foundation said in a statement Sunday.

The money also will be used to stop outbreaks of new variants of the virus. The announcement was made Sunday at the World Health Summit in Berlin.

The foundation says in a statement on its website that it has contributed nearly $5 billion to the polio eradication initiative. The initiative is trying to integrate polio campaigns into broader health services, while it scales up use of the novel oral polio vaccine type 2.

The group also is working to make national health systems stronger so countries are better prepared for future health threats, the statement said.

“The last steps to eradication are by far the toughest. But our foundation remains dedicated to a polio-free future, and we’re optimistic that we will see it soon,” said foundation CEO Mark Suzman.

Pakistan has reported 20 polio cases so far this year, all in the north-western Khyber Pakhtunkhwa province.

Afghanistan, which has registered two cases this year, previously lacked access to vaccines because of violence and the Taliban banning polio teams in areas under its control. However last year, a few months after they took over Afghanistan, the Taliban agreed to allow United Nations health workers to begin a national campaign.

Pakistan has long struggled with Islamic militants targeting polio workers and the police protecting them, falsely claiming that vaccinations are a Western campaign to sterilize children. This year, it has the added challenge of unprecedented rainfall destroying road networks and health facilities, limiting vaccination drives, and displacing communities.

Despite the billions of dollars that have gone into the effort to eradicate polio since 1988 — the program costs about $1 billion every year — the World Health Organization and partners have missed repeated deadlines to wipe out the disease and have come under sustained criticism for failing to adapt to challenges. In recent years, for example, there have been more cases of polio linked to the oral vaccine used in eradication efforts than those caused by the wild virus.

Numerous experts have also questioned whether more money is what’s needed to eradicate polio, as the initiative is already one of the best funded in global public health and has rarely faced any funding gaps. Although WHO and partners have reduced the incidence of polio by more than 99%, that progress was largely made in the first 10 years. The disease remains stubbornly entrenched in war-torn regions of Afghanistan and Pakistan and there have been dozens of vaccine-triggered outbreaks in Africa and elsewhere in recent years, including the U.S. and Israel.

An independent panel formed to evaluate the eradication effort’s progress has repeatedly identified significant strategic mistakes made by countries, WHO and their donors, warning that their reluctance to change course, among other issues, may ultimately allow polio to resurge.

The eradication initiative is a public-private partnership led by a group of national governments that includes the Gates Foundation, Rotary International, the World Health Organization and the U.S. Centers for Disease Control and Prevention.