DOHA, Qatar—On the sixth and last day of marathon talks between the Afghan Taliban and a team of U.S. negotiators led by veteran ambassador Zalmay Khalilzad, a convoy of luxury cars converged on the luxurious offices of this rich little country’s foreign ministry. The Taliban emerged in traditional Afghan clothing, wearing black or gray turbans, the Americans in business suits and ties, as they sat down at a long table in the meeting hall.

What the members of the Afghan government of Ashraf Ghani might have worn can be imagined but not known. They were not there.

These were negotiations to extract the United States from its longest war, the objective a framework agreement calling for a ceasefire that would open the way for American troops to get out. In exchange, the Taliban would agree not to harbor jihadists who aimed to attack the U.S. and other far-flung targets, as they had done with Osama bin Laden when he organized 9/11.

This could be construed as wise policy to end what has been an endless war, or a sell-out of those Afghans, not only the Ghani government and its military, but men, children and women—especially girls and women—who hoped their rights to education and a future of freedom might be assured. After all, that’s what the Americans had promised them again, and again, and again.

Ryan Crocker, a former envoy to Iraq and Afghanistan, bluntly called the negotiations a “surrender” in an op-ed for The Washington Post.

Here in Doha, the Taliban consumed pot after pot of green tea, and broke for prayers, while the Americans, weary from long sessions, drank heavy cups of coffee. Their language was careful. This was the most sensitive of all the meetings.

Khalilzad, also a former ambassador to Iraq and to Afghanistan, knows how to talk to the Taliban. Sometimes, impatient with the official translation, he would start talking directly to the Taliban in Farsi and, during breaks, in Pashto.

Khalilzad also knows how to bargain like an Afghan. He had waited in Pakistan for four days rather than starting the talks as originally scheduled while the Pakistanis pushed to hold the talks in their capital. All this put pressure on the Doha-based Taliban leadership, which finally had to insist that the negotiations take place here.

But that was at best a very minor tactical win.

As a former Taliban minister told The Daily Beast, the agreement not to support terrorists or their operations has been on the table for years: “Since 2005, the Taliban have kept saying we won’t be threats to anyone in the future. We just wish the United States had realized that earlier.”

That much was agreed to on the first day of the talks. It was the main course. The problem came when the Americans tried to order side dishes, and the Taliban said no way. Nothing else would be on offer until the Americans gave a clear date for withdrawal of all their troops.

At the end, Khalilzad said the other point of agreement was to seek a ceasefire, but that is an extremely sensitive point for the Taliban, and not a done deal.

“We would have liked to make more progress,” one member of the Taliban delegation in Doha told us. “But Khalilzad does not have enough authority, so he kept changing his position.”

Do the Taliban really want peace? The answer may well be yes, but probably not as much as the Americans want out.

“The Taliban are in a win-win position. We can talk or we can walk,” a senior official on the ground in Afghanistan told us over the phone. “Our jihad was not started against the presence of U.S. forces, it was started in 1994 to found an Islamic state. A U.S. withdrawal will not end our struggle. An Islamic regime will end our jihad.”

Other Taliban leaders disagree. They want the war to end. “The Taliban could fight forever, but the goal of the Taliban should not be just to fight,” another former Taliban minister told The Daily Beast. “Afghans need to breathe the air of peace, and the Taliban should change from a military combat force to an Islamic political party that can achieve the same goals through political struggle.”

“Sadly,” said the former minister, “for the last 40 years the Afghans have wasted the chances for peace . I wonder what they will achieve this time.”

“If we waste this last chance for peace, we will no longer exist as a nation and as a state,” says Afghan journalist and author Asamt Qani.

A Taliban think tank claims that it has heard from its contacts in Russia that the U.S. definitely is leaving Afghanistan by the end of 2020, but the suddenness of the Trump decision has taken the Taliban themselves by surprise.

“It seems Trump has made up his mind,” said one of the former Taliban ministers. “Now it’s up to the Taliban to decide what we want to order off the peace menu.”

An official in the Ghani government wishes he could say the same. “We are totally excluded from the Khalilzad decision-making,” he told The Daily Beast. “He only passes on his reports, but he is not listening much to Ghani at all. Perhaps he knows that Ghani is in deep water.”

“It’s up to the United States whether they want to stay or leave,” says Umar Al-Mahajar, 30, a Taliban fighter from Khost. “The Americans are calculating their costs, I am drinking water from the countryside and eating dry bread: $100 is enough for a year of my expenses. We are not in any hurry.”

But a majority of the older and wiser members of the Taliban’s ruling councils disagree. “We have to move toward a peace deal,” said one. There’s a consensus that with the Americans gone, the Taliban could re-take Kabul in a matter of months, he said, “But so what?”

“We took Kabul once before,” he noted, “but our regime had no support from the international community. That is not really a victory. It is better to sign a deal—a good deal of course—then convert from a military to a political force.”

But, still, the question of a ceasefire remains, and it could be the shrewdest American demand.

“I don’t think the Taliban will be easy to convince,” said the same ex minister. “The day a ceasefire is put in place, 40 to 50 percent of the Taliban fighters will put down their arms, and if the deal doesn’t work out, they won’t come back.”

Jan Muhammad probably would be one of those. At 42, he is fed up with fighting. “Already the war turns from war with infidels to Afghan-to-Afghan war,” he told The Daily Beast. “The day a ceasefire is in place, that will be my last day forever.”

“To be very honest,” said Mullah Abdul Bari Agha, with the Taliban in Helmand, “it was the presence of the U.S. forces that kept us in the fight. Otherwise the killing and bombing of our own Afghan brothers is not the best, most ideal type of jihad.”