US President Donald Trump said on Saturday he had canceled a year of peace negotiations with the Taliban to end 18 years of conflict in Afghanistan.

Trump also revealed in a series of tweets on Twitter that he was scheduled to meet Sunday at Camp David, separately and in complete "secret", both Afghan President Ashraf Ghani and "key leaders of the Taliban."

"They were on their way to the United States this evening," he said, but "I canceled the meeting immediately."

To justify his decision to cancel peace talks with the Taliban, Trump said, "They have acknowledged an attack in Kabul that killed one of our great soldiers and 11 others."

"What kind of people are those who kill so many people in order to strengthen their negotiating position?"

"If they cannot accept a ceasefire during these important peace talks, and in return they are capable of killing 12 innocent people, then they probably do not have the means to negotiate a meaningful deal."

"How long will they continue to fight?" Trump concluded.

Two NATO soldiers, one American and one Romanian, among 12 others were killed last Thursday when the Taliban carried out a car bomb attack at a security post near the headquarters of the NATO-led firm in Kabul.

The United States and the Taliban have been holding rounds of negotiations in the Qatari capital Doha for months, resulting in a draft deal that would provide for the withdrawal of thousands of US troops in the coming months in return for guarantees that the territory would not be used as a base for militant attacks on the United States and its allies.