WASHINGTON (AP) — The president of Afghanistan told a U.S. audience Monday that his country is not losing the war to the Taliban and is not at risk of collapse amid escalating attacks by the militant group and an expansion of the territory it controls.

President Ashraf Ghani said his administration is intent on seeking a negotiated peace with the Taliban, which have shown no interest in direct talks with a government they see as illegitimate.

"The Taliban are not in a winning position," Ghani said by video to an audience at the School of Advanced International Studies at Johns 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 more than 28,000 Afghan forces have been killed in the past four years but that the military will be able to retake territory as long as it has an air force and commando troops. He said most of the losses incurred by its security forces were in defending static positions, so the government was rethinking how it deploys its forces.

Speaking on Veterans Day, the Afghan leader paid tribute to American sacrifices in Afghanistan, including the death of Brent Taylor, a Utah mayor serving as a major in the state's Army National Guard who was training Afghan commandos. Taylor, 39, was fatally shot a week ago by one of his Afghan trainees.

But Ghani also offered a rare public accounting of the scale of the Afghan losses. He described how their casualties have risen sharply while U.S.-led coalition casualties have declined after Afghan forces assumed responsibility for combat operations in the country. He said that since 2015, 58 American forces have died in Afghanistan.

"In the same period, 28,529 of our security forces have lost their lives and become martyrs," he said.

U.S. military officials have previously indicated that Afghan casualties have been increasing, but they have avoided giving hard figures, apparently because of political sensitivities.

In its most recent report to Congress, in October, the special inspector general for Afghanistan said Afghan casualty numbers had been reported only in classified form since September 2017 because the U.S. military command in Kabul said it had stopped making them public at the request of the Afghan government. However, the report said that the average number of casualties between May and October this year was the greatest it has ever been during similar periods.

On Oct. 30, Defense Secretary Jim Mattis said Afghan forces had more than 1,000 dead and wounded during August and September alone, "and they stayed in the field fighting."

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 inspector general report said the number of districts under Afghan government control and influence has declined and stands at just 55 percent — down 16 percentage points 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 they view 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.

He insisted that the Afghan government was seeking a negotiated peace but would not do so "from a position of weakness."

In a possible sign of America's efforts, Pakistan released two Taliban officials 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 Pakistan has yet to demonstrate a "sense of urgency" in seeking an end to the Afghan conflict and a change in its policies.

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

___

Associated Press writer Robert Burns contributed to this report.

Copyright 2018 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.