Washington (AFP) - Stunning the world by saying he was canceling secret talks with the Taliban, President Donald Trump is again displaying his trademark unpredictability -- at the cost, critics say, of weakening US credibility.

After his three made-for-television summits with North Korean strongman Kim Jong Un, and as he voices openness to meeting Iran's leadership, Trump showed like never before that he is eager to talk to US adversaries by inviting the Taliban, the Islamist militants who have been fighting US troops for nearly two decades in Afghanistan.

But in revealing the bombshell, Trump had a dual surprise -- the talks focused on a US troop withdrawal, which were to be held at the Camp David presidential retreat on Sunday, were off.

He pointed to the Taliban's killing of a US soldier on Thursday in a bombing in Kabul, the latest in a string of deadly attacks.

Aaron David Miller, a longtime presidential aide who helped arrange the ultimately unsuccessful Israeli-Palestinian-US summit at Camp David in 2000, believed that Trump was trying to put the brakes on a bad deal -- and, as usual, to put himself in the middle.

"This clearly plays to the president's instincts and his need to be at the center of attention," said Miller, now a distinguished scholar at the Woodrow Wilson Center for International Scholars.

He questioned why the president -- not a special envoy or secretary of state -- would lead negotiations and why they would take place at Camp David, where a 1978 summit brought peace between Israel and Egypt.

"It looks bad symbolically, and practically. Look at the result now. The president has suspended any negotiations with the Taliban," he said.

"He appears to have made the situation worse," he said, branding Trump's approach "the summit of the vanities."

Both the Trump administration and the Taliban have however kept the door open to future talks.

- 'The world is watching' -

Trump, a self-proclaimed master negotiator who published a 1987 book called "The Art of the Deal," has spoken of his penchant for throwing others off guard.

Story continues

He has repeatedly followed his own advice as president, notably on China, where he has tossed out the rulebook of trade talks by repeatedly and suddenly hiking tariffs.

Brian Katulis, a senior fellow at the left-leaning Center for American Progress, said it was hard to identify a single foreign policy success brought by Trump's tactics.

"There doesn't seem to be any common thread or philosophy that drives his approach besides the use of own personal unpredictability," said Katulis, who worked in the White House under Bill Clinton.

"This approach undercuts those who work for him in trying to do the foundational work needed to advance a peace deal in Afghanistan or get an agreement with North Korea or Iran," he said.

"This creates the effect of the United States being a much more unpredictable and erratic actor, and this style ultimately may produce incentives for other countries to simply discount the word of America or any process it is engaged in right now."

Senator Amy Klobuchar, a Democratic presidential candidate, accused Trump of treating foreign policy "like it's some kind of game show."

"He wants to have that moment, but then all the details aren't done, and then we end up in a worse place on the world stage," she told CNN.

"The world is watching. China is watching. Russia is watching. They realize the weakness this creates when we don't have consistency," she said.

- Decisive in the end? -

Defenders of Trump said he showed decisiveness by calling off the summit after the attack, which apparently took place after the invitation to Camp David.

"If Taliban think we are doing peace deal so they can walk back in and slaughter Afghans at will and turn the country back into a terrorist Disneyland, then they are sadly mistaken," said James Jay Carafano, a fellow at the conservative Heritage Foundation, tweeting that Trump delivered an "unmistakable message."

Trump also delighted his conservative base in February when he left a Hanoi summit with Kim without a deal, as his aides pressed for clear denuclearization steps by North Korea.

But political watchers believe that Trump is eager for an emblematic victory before he faces re-election next year -- such as ending the increasingly unpopular Afghan war.

"On the most important issues concerning our foreign policy, the president has either failed to produce successes or he set us back," said Nicholas Burns, a veteran US diplomat who is now a professor at Harvard University.

On Afghanistan, he said, "It's weak to indicate publicly that you're desperate to get out and that you want to do it before the 2020 election."