KABUL (Reuters) - The United States is asking its allies helping with security in Afghanistan to maintain funding for Afghan forces at a cost of nearly $5 billion a year until at least 2020, a top U.S. military commander said on Monday.

Graffiti is seen on a wall of the Darul Aman palace in Kabul, Afghanistan, June 5, 2016. REUTERS/Omar Sobhani

The plan extends the international financial commitment for the foreseeable future at a time when Western leaders have been hoping to reduce Afghanistan’s reliance on foreign military aid.

Military commanders are making the pitch for continued funding ahead of a NATO summit in Warsaw in early July, where the alliance’s leaders will discuss support for the Afghan government, which is struggling to contain a resurgent Taliban insurgency.

“There is strong agreement, certainly from the chiefs of defense, that the support for Afghanistan ... needs to continue,” Major General Skip Davis told reporters in Kabul.

“I think there is much more consensus on the fact that stemming extremism here, in the region, is a direct contribution to security in the homeland. There’s a willingness to do what it takes.”

Efforts by Western nations to extract themselves from the war in Afghanistan have been frustrated by high levels of violence.

When they gathered at a similar summit in 2012, NATO members and other nations had planned on slowly reducing financial support for Afghanistan as international troops withdrew.

“Obviously, conditions have changed since decisions were made back in 2012 and 2014,” Davis said.

Under the current funding structure, the United States provides a little more than $3.5 billion a year.

Other countries contribute another $900 million to $1 billion, while the Afghan government pays more than $400 million, a share Davis said was expected to grow.

Commanders say that general level of funding is expected to continue for at least four years.

The funding is based on maintaining a goal of 352,000 Afghan soldiers and police. The official roster currently includes about 320,000 members of the security forces, Davis said.

Among the factors that coalition commanders are considering as they recommend funding and troop levels are the high rates of Afghan casualties, their struggles in training new troops and replacing damaged equipment, and the continuing “fragility” of the national government, Davis said.

“Last year was a big signal that the Afghan army and police need some more time,” he said.

“They are resilient, they fought well and they took on leadership, but at the same time, they had some significant challenges and the Taliban proved much more resilient than we expected and less likely to come to the table for reconciliation.”