For much of the yearlong talks, the Taliban and the United States were fundamentally on the same page: The Taliban wanted the Americans out of Afghanistan, and Mr. Trump has made no secret of his desire to end what he has called America’s unending wars. But agreeing upon the details of a deal proved complicated.

In the agreement the two sides were on the verge of finalizing before Mr. Trump pulled the plug, the best the American negotiators could get the Taliban to consent to was some reduction in violence. Discussions on a comprehensive cease-fire were relegated to future talks between the Taliban and Afghan leaders — only after the United States had pledged, and begun, to withdraw its troops.

But on Thursday, Mr. Trump suggested the Taliban position had shifted.

“They didn’t want to do a cease-fire, but now they do want to do a cease-fire, I believe,” he said. “And it will probably work out that way. And we’ll see what happens.”

The Taliban seemed surprised by Mr. Trump’s declaration. While the group’s negotiators have held informal meetings with United States diplomats in recent weeks about ways to go back to the table, on Friday their leaders said their original position on a cease-fire had not changed.

“The Americans walked away from the negotiating table, and now the ball is on their side — it is up to them to come back if they want to solve this and get the document to signing and to the stage of implementation,” Suhail Shaheen, a member of the Taliban’s negotiation team, said in an interview. “Our positions remain the same.”