The Pentagon is warning that a “robust” counter-terrorism capability must remain in Afghanistan against groups including al-Qaida, even if a peace deal with the Taliban is secured.

According to a Pentagon report released Friday, the Afghan government, the U.S. and coalition partners will continue to face risks from al-Qaida, the Islamic State of Iraq and Syria-Khorasan Province, as well as from some in the Taliban.

“Even if a successful political settlement with the Taliban emerges from ongoing talks, AQ, ISIS-K, and some unknown number of Taliban hardliners will constitute a substantial threat to the Afghan government and its citizens, as well as to the United States and its coalition partners,” the report says.

“This enduring terrorist threat will require the United States, the international community, and the [Afghan National Defense and Security Forces] ANDSF to maintain a robust [counter-terrorism] CT capability for the foreseeable future,” the report says.

The Pentagon’s assessment coincides with recent comments made by U.S. Special Representative for Afghanistan Reconciliation Zalmay Khalilzad, who touted recent progress made during peace negotiations this month in Doha, Qatar.

The peace agreement is based on four central pillars, including a withdrawal of U.S. troops from Afghanistan. The discussed agreement would also bar the Taliban from allowing terrorist groups like al-Qaida and ISIS from using the country as a haven to plan future terrorist attacks.

“The last 6 days of talks have been the most productive session to date. We made substantive progress on ALL 4 parts of a peace agreement: counter-terrorism assurances, troop withdrawal, participation in intra-Afghan dialogue & negotiations, and permanent & comprehensive ceasefire,” Khalilzad tweeted July 6.

Although the Taliban has historically pushed back on meeting with the Afghan government, intra-Afghan dialogue continued on July 7 and 8. Khalilzad claims his goal is to wrap up an agreement by Sept. 1.

The Pentagon’s report was also published a day after Army Gen. Mark Milley warned against pulling U.S. troops from Afghanistan “prematurely” during his confirmation hearing to replace Marine Corps Gen. Joseph Dunford as chairman of the Joint Chiefs of Staff July 11.

Even so, Milley predicted U.S. participation in Afghanistan will scale down upon nailing down a peace deal with the Taliban.

“I think that the war in Afghanistan, at least American participation in the war in Afghanistan, comes to an end when our interests are met, and I think that’ll be met through a negotiated settlement with the Taliban,” Milley told members of the Senate Armed Services Committee.