By Mujib Masahal, New York Times

American and Taliban officials have agreed in principle to the framework of a peace deal in which the insurgents guarantee to prevent Afghan territory from being used by terrorists, and that could lead to a full pullout of American troops in return for a cease-fire and Taliban talks with the Afghan government, the chief United States negotiator said Monday.

“We have a draft of the framework that has to be fleshed out before it becomes an agreement,” the American envoy, Zalmay Khalilzad, said in an interview with The New York Times in Kabul. “The Taliban have committed, to our satisfaction, to do what is necessary that would prevent Afghanistan from ever becoming a platform for international terrorist groups or individuals.”

He added: “We felt enough confidence that we said we need to get this fleshed out, and details need to be worked out.”

After nine years of halting efforts to reach a peace deal with the Taliban, the draft framework, though preliminary, is the biggest tangible step toward ending a two-decade war that has cost tens of thousands of lives and profoundly changed American foreign policy.

A senior American official, speaking on condition of anonymity to discuss negotiations that were still continuing, said that the Taliban delegation had asked for time to confer with their leadership about the American insistence that the insurgents talk with the Afghan government and agree to a cease-fire as part of any finalized deal. The official said they had made it clear to the Taliban that all the issues they had discussed were “interconnected” as part of a “package deal.” The official’s account was supported by details that have been leaked by some Taliban and Western officials in recent days.

Although other Taliban sources said that more concrete details of an American troop withdrawal had already been agreed upon, American officials said on Monday that those details had not yet been hashed out.

Mr. Khalilzad returned to Afghanistan on Sunday to brief the government in Kabul after conducting six days of talks with the Taliban delegation in Doha, Qatar.

a man in a military vehicle on a rock: Afghan Army troops, left, and American soldiers attacking a Taliban firing position in 2013.© Bryan Denton for The New York Times Afghan Army troops, left, and American soldiers attacking a Taliban firing position in 2013.

In an address to the nation after being briefed by Mr. Khalilzad, President Ashraf Ghani expressed concern that a peace deal would be rushed. He highlighted previous settlements that ended in bloodshed, including when the Soviet Union withdrew from the country.

Despite a promise of a peace deal at the time, Afghanistan broke into anarchy, and years later the Afghan president who had been in charge during that transition was hanged from a pole at a traffic roundabout.

“We want peace quickly, we want it soon, but we want it with prudence,” Mr. Ghani said. “Prudence is important so we do not repeat past mistakes.”

During the talks last week, the Taliban signaled their seriousness by appointing one of their most powerful officials from the original movement, Mullah Abdul Ghani Baradar, as their chief peace negotiator.

Though American and Afghan officials said that Mr. Baradar was not directly involved in the marathon meetings last week, with some sessions lasting as long as eight hours, he was expected to take the lead in the talks to come. The senior American officials said new high-level talks would start in late February, but suggested that teams from both sides could start on technical details before then.

The interview with Mr. Khalilzad on Monday was the first time that the American government had directly confirmed some details of the agreement taking shape.

As the first step in the framework, Mr. Khalilzad said that the Taliban were firm about agreeing to keep Afghan territory from being used as a staging ground for terrorism by groups like Al Qaeda and other international terrorists, and had agreed to provide guarantees and an enforcement mechanism for that promise.

That had long been a primary demand by American officials, in an effort to keep Afghanistan from reverting back to being the kind of terrorist base it had been at the war’s start, in 2001 after Al Qaeda’s Sept. 11 attacks on the United States.

The next set of contingencies laid out by the senior American official involved in the talks would see the United States agreeing to withdraw combat troops from Afghanistan, but only in return for the Taliban’s entering talks with the Afghan government and agreeing to a lasting cease-fire.

Those last two points have long been resisted by Taliban officials, and could still provide trouble with the process, officials say. The Taliban delegation in Qatar said they had to break to discuss those details with their leadership.

But the agreement in principle to discussing them at all was seen as a breakthrough after years of failed attempts, American and Afghan officials said.

While these initial topics have been generally accepted by senior Afghan officials, there is concern about the fact that the Afghan government has still been sidelined from the talks. Officials close to Mr. Ghani say he is particularly concerned that the Americans might negotiate important agreements that Afghan officials are not party to, potentially including the shape of an interim government outside of elections.

Mr. Ghani has repeatedly insisted that such details only be taken up in direct talks between the government and the Taliban.

On Monday, Mr. Khalilzad insisted that he was trying to push the Taliban to negotiate those points directly with the Afghan side.

“There are a lot of reports that we have discussed an interim government: No, I have not gotten into any of that discussion,” Mr. Khalilzad said. “I have not entered into what that could look like with the Taliban — they would like to talk to me about it, but I have not.”