WASHINGTON (AP) — Afghan President Ashraf Ghani denied Monday that the Taliban is winning the war in Afghanistan despite a continuing wave of deadly militant attacks and signs the militants are expanding areas under their control.

Ghani said the Afghan state is not at risk of collapse and reiterated his government’s intent to seek a negotiated peace. He insisted it would not do so “from a position of weakness.”

“The Taliban are not in a winning position,” Ghani said by video to an audience at the School of Advanced International Studies at John Hopkins University in Washington, as a suicide bombing in Kabul and a deadly militant assault on districts in eastern Afghanistan suggested government control was slipping further.

Ghani said that as long as Afghanistan has its air force and commando troops, they will be able to retake territory. He said most of the losses incurred by its security forces — which he said had totaled more than 28,529 since 2015 — were in defending static positions, so the government was rethinking how it deploys its forces.

The Trump administration has marginally increased U.S. troop numbers to train Afghan forces and intensify military pressure on the Taliban in hopes of forcing the insurgents to negotiate an end to the 17-year conflict. Successes on the battlefield have been elusive. The U.S. military recently reported that the number of districts under Afghan government control and influence is declining and stands at just 55 percent — down 16 percent in the past three years.

U.S. special envoy Zalmay Khalilzad is on his second tour of the region in a month, seeking to kick start a peace process. The diplomatic veteran is making stops in Pakistan, Afghanistan, the United Arab Emirates and Qatar, where the Taliban maintain a political office. The insurgents say they met Khalilzad in Qatar last month. The Taliban have so far refused direct negotiations with Kabul, which it views as a U.S. puppet.

On the sensitive topic of the U.S. role in talks, Ghani said there was “total agreement” between the U.S. and Afghan governments on moving the peace process forward. “U.S. engagement is to ensure that talks with the Taliban result not in negotiations with Taliban but with talks, direct talks, between the Afghan government and the Taliban,” he said.

In a possible sign of America’s efforts, two Taliban officials were released on Monday, members of the militant group said. Abdul Samad Sani, a U.S.-designated terrorist who served as the Afghan Central Bank governor during the militants’ rule in the late 1990s, and a lower-ranking commander named Salahuddin, were freed, according to two Taliban officials who spoke on condition of anonymity because they were not authorized to brief media.

Ghani, however, said the new Pakistan of Prime Minister Imran Khan had yet to demonstrate a “sense of urgency” in seeking end to the Afghan conflict. He said Afghanistan wants to engage with Pakistan but Afghanistan has yet to see a “substantive and measurable change” in its policies.

Kabul has long protested that Afghan Taliban leaders and fighters enjoy sanctuary inside Pakistan, which Islamabad denies.