WASHINGTON - President Donald Trump said Saturday that he had canceled a previously undisclosed summit at Camp David with Taliban leadership and Afghan President Ashraf Ghani after the Taliban took responsibility for an attack last week that killed a U.S. soldier.

Trump said the meetings had been set to take place Sunday.

On Twitter, the president appeared to cancel talks with the Taliban indefinitely, a significant blow to the peace process kicked off last year, which was nearing its conclusion.

In tweets Saturday evening, Trump wrote that he has "called off peace negotiations" and accused the Taliban of perpetrating the attacks to strengthen their negotiating hand.

"What kind of people would kill so many in order to seemingly strengthen their bargaining position?" Trump tweeted. "They didn't, they only made it worse!"

He continued: "If they cannot agree to a ceasefire during these very important peace talks, and would even kill 12 innocent people, then they probably don't have the power to negotiate a meaningful agreement anyway. How many more decades are they willing to fight?"

Ghani had previously announced that he would travel to Washington. His trip had initially been planned for Saturday, but he delayed the trip for several days.

The White House declined to provide further comment Saturday.

News of the Taliban's once-imminent arrival drew criticism from Rep. Adam Kinzinger, R-Ill., who serves in the National Guard. "Never should leaders of a terrorist organization that hasn't renounced 9/11 and continues in evil be allowed in our great country," he tweeted.

In his tweets, Trump appeared to reference a Thursday morning car bombing that killed two NATO service members, including one American, in a heavily fortified part of central Kabul. The Pentagon identified the soldier killed as Sgt. 1st Class Elis Angel Barreto Ortiz, a 34-year-old paratrooper from Morovis, Puerto Rico. He is the 16th American service member killed in combat in Afghanistan this year.

The attack, which killed a dozen in all, came just days after the top U.S. negotiator in the ongoing peace talks with the Taliban had announced that he had reached a deal "in principle." It was part of a surge of Taliban violence in recent days in Kabul and elsewhere, leaving scores of people dead.

It is not clear where Trump's abrupt move leaves the larger issue of an end to the longest American war or the return of U.S. forces. The secret summit would have been a step toward ratifying an agreement between the United States and the Taliban.

That deal, months in the making, largely had been handled by veteran diplomat Zalmay Khalilzad. Through painstaking negotiations, he worked to settle hostilities with the Taliban insurgency and prepare for an exit of all or most U.S. forces.

His work was expected to be ratified shortly.

Khalilzad arrived in Kabul last week, after a final negotiating session with the Taliban, to brief Ghani's government on the terms of the agreement. Those terms included the withdrawal of more than 5,000 U.S. troops - more than one-third of the total in Afghanistan - in exchange for the Taliban agreeing to sever ties with al-Qaeda and to continue its fight against the Islamic State.

The deal also included a Taliban commitment to begin inter-Afghan talks with the Ghani government, expected to start within weeks. The talks themselves would include discussion of a cease-fire.

Trump approved those terms when he met with Khalilzad and his top national security officials in late August. While national security adviser John Bolton was wary of the deal and argued that the Taliban could not be trusted, Secretary of State Mike Pompeo and others agreed that it would provide a good jump-start to an actual peace deal among the Afghan parties, allowing Trump to fulfill his campaign pledge of ending the war.

The initial U.S. drawdown was to occur over a 135-day period, during which the United States and the Afghan government could monitor Taliban behavior and gauge the militant group's commitment to the deal.

No one was entirely happy with the terms.

Ghani argued behind the scenes that the process cut him out and left the U.S.-backed government in Kabul vulnerable.

Trump was unhappy that the deal would initially leave about 8,500 troops in Afghanistan to prevent the country from once again becoming a haven for terrorism. Trump told confidants he felt frustrated that the proposed reduction under the draft deal would have taken force levels only back to where they were when Trump took office.

Officials also warned that the Taliban would step up their attacks in the days and weeks before it was signed, as both sides tried to improve their negotiating position for the upcoming inter-Afghan talks.

The attack Thursday was seen as part of that expected escalation. It deepened concern among Afghan officials that the proposed agreement does not offer enough assurance that civilians and security forces will be protected if U.S. troops withdraw.

However, the hope has been that, once the inter-Afghan talks began, violence would gradually die down as the two sides discussed a broader cease-fire.

The Camp David meeting would have allowed Trump not only to claim credit for the negotiations, but to put the president in place as the godfather of the actual signing of the document and the beginning of talks among the Afghans themselves.

Trump - who had long advocated for a U.S. withdrawal from Afghanistan before he took office - has complained that American forces are little more than "policemen" in Afghanistan and has said that he would finally end the war.

What remains unclear is why Trump waited until late Saturday - the day before the meeting at Camp David was to begin - to cancel talks over an attack the Taliban was clearly responsible for that was then three days old.

At the same time, the future of Khalilzad's negotiations remains uncertain, and it was not known whether Trump was canceling the peace deal altogether, or would use the incident to push for more Taliban concessions.

An official familiar with Khalilzad's efforts referred all questions to the White House for comment.

This article was written by Seung Min Kim and Anne Gearan, reporters for The Washington Post.