Kabul (CNN) -- A gunman who shot dead two American officers inside the Afghan interior ministry remained at large late Saturday as U.S. officials decried the attack in Kabul.
"This act is unacceptable, and the United States condemns it in the strongest possible terms," Defense Department press secretary George Little said in a statement.
The Taliban claimed responsibility, though NATO and Afghan officials are investigating and have not confirmed involvement by the Islamist militant group. A Taliban spokesman said the attack was in response to the recent burning of Qurans at a U.S. base.
The killing of the officers prompted Gen. John Allen to order all military advisers with the International Security Assistance Force to withdraw from government ministries in the Afghan capital as a precaution.
According to ISAF, initial reports indicated that "an individual" turned his weapon against NATO service members, later confirmed by an Afghan police official to be an American colonel and major.
The two officers were found dead in their office from gunshot wounds to the head, the Afghan police official said. "They were part of the advisory mission there," the official said. "At this stage we can't say why they were killed."
Hours later, U.S. President Barack Obama called Allen to discuss the situation and express condolences to the families.
"We welcome President (Hamid) Karzai's statement this morning encouraging peaceful expressions, and his call for dialogue and calm," Obama said in a statement released by the White House. "The United States remains committed to a partnership with the government and people of Afghanistan, as we work to realize our shared goal of disrupting, dismantling and defeating al Qaeda and strengthening the Afghan state."
The investigation into the attack is ongoing, and it was unclear who the shooter was, the Afghan official said. However, it's unlikely that the gunman was an outsider who had infiltrated the ministry, he said.
The attack happened in a separate compound inside the interior ministry where as many as 10 Americans are based, the Afghan official said. Such an attack would have to be planned, he said.
"The perpetrator of this attack is a coward whose actions will not go unanswered," Allen said.
Allen's order for ISAF advisers to withdraw includes the interior and defense ministries, among others, the U.S. official said.
The U.K. Foreign Office announced that British officials working in Afghan ministries in Kabul have also been withdrawn, as a "temporary measure."
ISAF provides advisers in key ministries to help train Afghan officials. It is not clear to what extent ISAF's military training mission was affected by the attack.
Afghan Defense Minister Abdul Rahim Wardak called his American counterpart, Leon Panetta, to offer his condolences and apologized for the attack, Little said. Panetta "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," he added.
Zabiullah Mujahid, a Taliban spokesman, said "the attacker is still alive and resisting and a second Mujahid managed to escape the ministry."
"This comes amid our call to all Afghan security forces to turn their guns towards the invading forces who are the real enemies of our country and religion and kill them so they leave our country," Mujahid said in an e-mail.
Saturday's brazen attack at the interior ministry came amid continued protests over the recent burning of Qurans at Bagram Airfield. A military official said the materials burned were removed from a detainee center's library because they had "extremist inscriptions" on them and there was "an appearance that these documents were being used to facilitate extremist communications."
A fifth day of demonstrations over the burning left four civilians dead and 50 injured near the United Nations office in Kunduz, said Saad Mokhtar, head of the city's health department. Twelve police officers were among the wounded Saturday.
Allen addressed the burning issue during a visit to a military base where two U.S. soldiers were killed Thursday by a man wearing an Afghan National Army uniform. A protest over the burning of Qurans was taking place outside the base at the time of the killings.
Allen called on troops to "show the Afghan people that as bad as that act was at Bagram, it was unintentional, and Americans and ISAF soldiers do not stand for this. We stand for something greater than that."
Obama also apologized for the incident.
Muslims believe the Quran is the word of God, so holy that people should wash their hands before touching the sacred book.
CNN's Barbara Starr contributed to this report.