WASHINGTON - Deadly setbacks, an Afghan leader at the “end of the rope” and pressure from a public weary of sacrifice are threatening to upend President Barack Obama’s endgame for America’s longest war.

The central premise of US war policy - leaving behind a stable nation that Afghans can secure and thwart an Al-Qaeda renaissance - appears in question.

Relations with President Hamid Karzai are plumbing new lows after an American soldier launched a rampage against civilians, then was airlifted out of the country to face US military justice.

Deadly riots that followed the burning of Qurans by Americans, a spate of incidents in which Afghan soldiers turned their guns on NATO tutors and regular combat deaths have posed the question: is the war still worth it?

US-backed reconciliation talks with the Taliban meanwhile have collapsed, dampening hopes of a political settlement to guarantee stability after NATO-led forces leave in 2014.

Is US strategy in trouble?

A furious Karzai this week called for a withdrawal of US forces from villages after the massacre of 16 civilians and demanded an accelerated transfer of security control.

His outbursts have deepened the feeling among some in Washington that Karzai, once seen as a hero, is an unreliable ally unworthy of US sacrifices.

Obama was forced to call Karzai twice in a week, as the Afghan leader admitted that he was at “the end of the rope” with US missteps.

Moeed Yusuf of the US Institute for Peace warned that such incidents could undermine efforts to keep Obama and Karzai “on the same page.”

“If this continues, I don’t see how one can hold on to the strategy, which is in large parts dependent on having the goodwill of the average Afghan.”

US ambassador to Kabul Ryan Crocker, however, hinted that Washington believed Karzai was venting for domestic political reasons, telling “PBS Newshour” he was right to be “pretty upset” over the massacre.

But the latest setbacks, as NATO plans to scale down to a support role in 2013, focused attention on the compromised nation foreign troops will leave behind.

“What we hand off, when we hand off, at best is going to be a stalemate,” said Stephen Biddle of the Council on Foreign Relations.

“I don’t personally think there’s any reasonable expectation the Afghan National Security Forces are going to be able to substantially expand the zone of control that they receive from us.”

Given such a pessimistic outlook, some analysts say it may be time to limit the exposure of NATO trainers.

Charles Dunlap of Duke University Law School suggested Afghan soldiers might be given intensive training outside the country, to contain the aggravation posed by a large foreign force.

“What I am suggesting is a much smaller footprint with Afghans in the lead. We are moving that way, but I think we need to accelerate it.”

— When will troops come home? —

Obama said Wednesday he planned no “sudden” changes to a plan that will complete the pullout of 33,000 surge forces this summer, though a larger drawdown is almost certain next year.

But could increasing the pace of departures squander gains made in the blood of 3,000 dead coalition troops?

“It gives hope to our enemies, which might be one reason why we see the Taliban announcing they are walking away from the early stages of peace talks,” said Max Boot, also of the Council on Foreign Relations.

“Why should they negotiate when they know our time, our commitment is waning and our presence is time limited?”

But to stay on longer would require leaders to explain why they are leaving young men to die in Afghanistan when progress seems so incremental.

With Osama bin Laden dead and Al-Qaeda dismantled in Afghanistan, publics in NATO nations may wonder whether two more years of sacrifice is worth it.

Obama took on that question head on as he appeared with top war ally British Prime Minister David Cameron on Wednesday.

“This is a hard slog... (but) we’re now in a position where, given our starting point, we’re making progress. And I believe that we’re going to be able to achieve our objectives in 2014.”

Obama faces a political dilemma: he wants to tell voters in November he got troops home from Iraq and will soon exit Afghanistan.

But an over-hasty withdrawal could risk igniting more trouble late in his election campaign, or so weaken Afghan strategy that a deeper crisis could detonate in his hoped-for second term.

The public is weary of war: 60 percent in a recent ABC News poll said it was not worth fighting - but is not so sour that Obama’s hopes of reelection are threatened.

Fifty-seven percent said in a Pew poll that troops should be home as soon as possible - hardly figures likely to sway an election turning on the economy.

And Mitt Romney, Obama’s most likely Republican opponent, warns against precipitated withdrawals, leaving the president on the public’s side of the political equation.