Updated

The shooting deaths of two U.S. military advisers in the Afghan capital and the quick decision to pull coalition personnel from all government ministries injected a sobering measure of doubt about the reliability of the most important U.S. ally in the war.

The Pentagon condemned what it called the murder of the two American officers but said it was committed to working closely with the Afghans to counter violent extremism and to stabilize the country.

President Barack Obama telephoned the top U.S. commander in Afghanistan, Gen. John Allen, with condolences. And the White House praised President Hamid Karzai's efforts to restore calm in his country.

In a written statement, Defense Secretary Leon Panetta's press secretary said Afghan Defense Minister Gen. Abdul Rahim Wardak called Panetta on Saturday to offer his condolences and to apologize.

"Secretary Panetta appreciated the call and urged the Afghan government to take decisive action to protect coalition forces and curtail the violence in Afghanistan after a challenging week in the country," spokesman George Little said.

He said Wardak told Panetta that Karzai was assembling religious leaders, parliamentarians, Supreme Court justices and other senior officials "to take urgent steps" to stop the violence.

White House press secretary Jay Carney said the administration welcomes Karzai's statements "encouraging peaceful expressions, and his call for dialog."

Even if Saturday's killer turns out not to be an Afghan, the deaths compound a perception of insecurity in the heart of Kabul after a series of recent security failures and Afghan outrage over U.S. burning of Muslim holy books. The Taliban claimed responsibility and said the attack, was in retaliation for what U.S. officials have said was the inadvertent burning of Afghan religious materials, including Qurans, at Bagram air base north of Kabul.

Allen, who commands both U.S. and coalition forces in Afghanistan, said the killer's actions "will not go unanswered." Citing security reasons, he recalled all coalition personnel from Afghan ministries. NATO forces have advisers embedded in many Afghan ministries, both as trainers and to help manage the transition to Afghan control as foreign forces prepare to withdraw by the end of 2014. The Afghan Interior Ministry oversees all the country's police, so has numerous NATO advisers.

A White House statement said Obama thanked Allen for his steps to protect U.S. troops and to encourage calm. It also said the United States "remains committed to a partnership with the government and people of Afghanistan."

Still, the killings are likely to provide new momentum for critics of President Barack Obama's war policy, as well as Republicans who fault him for having apologized for the Quran burning.

Obama's apology Thursday, shortly after Allen expressed deep regret, was seized on by the president's Republican rivals as a sign of American weakness. Presidential primary candidate Newt Gingrich said it was the Afghans who should be apologizing, given their shocking perfidy.

These tensions coincide with planned administration meetings in Washington in the week ahead with the Afghan ministers of defense and the interior. It was unclear Saturday whether the session, including one on Thursday with Panetta at the Pentagon, would go on as scheduled.

Those talks are seen as important in the lead-up to a NATO summit meeting in May in Chicago, when the alliance and Karzai intend to determine the path to turning over full security responsibility to the Afghan government by the end of 2014.

Central to the U.S.-led international coalition's strategy for countering the Taliban insurgency is the idea of building up Afghan security capacity by working closely with the Afghan army and police. That requires a measure of trust, which is undermined when Afghans turn their guns on their foreign partners.

Just this past week the U.S. Army announced it was creating specially tailored brigades — some now getting training in the U.S. — to perform training and advising missions in Afghanistan starting this summer. It will assign 18-person teams to Afghan combat units in hopes of improving their ability to handle the Taliban insurgency on their own by 2014.

Even before the Quran burning and the unrest it unleashed across Afghanistan, U.S. and allied troops had been killed in increasing numbers by their Afghan partners. Last month France suspended its military training program after an Afghan soldier shot and killed four French soldiers.

After the French deaths, Allen issued a statement lamenting "this very serious issue of individuals targeting our forces." He pledged then, and again after Saturday's killings, to continue to work closely with the Afghan government.

Just this past Thursday two American soldiers were shot to death by a member of the Afghan army at a base in eastern Afghanistan amid protests over the Quran burning.

___

Associated Press writer Mark S. Smith contributed to this report.