The Taliban must ensure that Afghanistan does not become a sanctuary for extremists, top US defense officials said today, as peace negotiations with the powerful insurgent group appear to be nearing their conclusion.

Defense Secretary Mark Esper, who was confirmed as the Pentagon chief just one month ago, told reporters that talks with the Taliban in Qatar must guarantee that Afghanistan "is no longer a safe haven for terrorists to attack the United States." 

General Joseph Dunford, chairman of the Joint Chiefs of Staff, said a deal on drawing down the 13,000 US troops in the country, after fighting for nearly two decades to what many call a stalemate, must not leave Al-Qaeda, the Islamic State (IS) group and other US-designated "terror" organizations space to continue their activities.

"I m not using the withdrawal word right now," Dunford said, standing next to Esper.

"I m using, we re going to make sure that Afghanistan is not a sanctuary, and we re going to try to have an effort to bring peace and stability to Afghanistan." 

Dunford said it was clear that there needed to be a negotiated solution, and one that involved not just the United States but the Afghan government.

"I view any agreement that would be pending is something we are doing with, not to, the Afghan people."

"What is needed is some type of disruption to the status quo," he said.

"I think an agreement that can initiate inter-Afghan dialogue, potentially leading to a reduction in violence associated with the insurgency, is something that s worth trying."

"I think any of us who have served there have long known that what s going to be required is a negotiated peace settlement," he said.

"We want stability for the Afghan people."

Amid concerns that Afghan government forces are not yet capable of confronting IS, which has mounted repeated deadly attacks against the military and civilians, Dunford declined to say whether the Pentagon was planning to keep come counter-terror operations active in the country over the years to come.

Any agreement is going to be "conditions-based," he said, and it was "premature" to talk about "what our counter-terrorism presence in Afghanistan may or may not be." 

"The president and the secretary have made it quite clear to me that, as this progresses, we ensure that our counter-terrorism objectives are addressed." 

Meanwhile, both Esper and Dunford distanced the US military from a series of strikes Israel has allegedly conducted in Iraq, Syria and elsewhere targeting Iranian-linked weapons depots and supply lines.

Members of the Iraqi government have expressed concern about the attacks and a series of drone flights as violating the country s sovereignty.

Washington says it is only in Iraq for the US campaign against IS, and the Pentagon on Monday said in a statement that it did not conduct the recent attacks and called allegations that it did "misleading and inflammatory."

"We are in Iraq at the invitation of the Iraqi government... working with and through the Iraqi forces to execute the D-ISIS campaign," Esper said, referring to anti-IS efforts.

"Obviously we are concerned about anything that may impact our mission, our relationship or our forces."