NBC's Atia Abawi reports.
Updated at 5:36 p.m. ET: A gunman shot dead two American military officials inside the heavily guarded Afghan Interior Ministry in the center of the capital Kabul on Saturday in an alarmingly brazen attack, as protests raged across the country for a fifth day over the burning of the Muslim holy book at a NATO base.
The Americans, who were U.S. Army officers serving as advisers to the Afghan security forces, were sitting at their desks inside the government ministry building when they were killed, NBC News reported. They were shot in the back of the head, Western officials speaking on condition of anonymity told The Associated Press.
U.S. officials said the assailant — who has not been identified by name or nationality — remained at large and a manhunt was under way.
Underscoring the gravity of the attack and apparent security breach, Gen. John Allen, the commander of NATO and U.S. forces in Afghanistan, ordered all NATO personnel recalled from Afghan ministries "for obvious force protection reasons."
Retired Army Gen. Barry McCaffrey offers analysis of the deaths and protests in Afghanistan.
"We are investigating the crime and will pursue all leads to find the person responsible for this attack. The perpetrator of this attack is a coward whose actions will not go unanswered," Allen said in a statement.
The U.S. servicemen — a lieutenant colonel and a major — were found dead on the floor of an office that only people who know a numerical combination can get into, Afghan and Western officials told the AP.
"There is CCTV there and special locks. The killer would have had to have the highest security (clearance) to get to the room where they were killed," an Afghan security source told Reuters.
NATO spokesman Lt. Col Jimmie Cummings said "initial reports say it was not a Western shooter." He declined to provide further information.
In an e-mail sent to Western officials in Kabul from NATO headquarters, the attack was described as “green on blue,” which is the military term used here when Afghan security forces turn their weapons on their Western military allies, The New York Times reported.
The Afghan Taliban claimed that two of their fighters had managed to enter the building in Kabul and kill four "high-ranking U.S. advisers," according to NBC News. U.S. military officials confirmed only two deaths and the Taliban claim could not be independently verified. The Taliban often exaggerate claims of responsibility for terror attacks.
Musadeq Sadeq / AP
A U.S. military convoy enters the Afghan Interior Ministry in Kabul on Saturday after a gunman killed two American advisers inside.
"Our suicide bomber Abdur Rahman along with another fighter managed to enter the interior ministry and open fire at the Americans. Before carrying out the suicide attack, Abdur Rahman told us on telephone that he had killed four high-ranking Americans. The second fighter successfully escaped the building and has joined his fighters now," the Taliban spokesman, Zabihullah Mujahid, said in a phone call to NBC from an undisclosed location.
Military leaders and politicians haven't had much success in stopping the violence, but religious leaders have. NBC's Atia Abawi reports.
He said it was revenge for the desecration of holy Quran by the U.S. forces.
In Washington, Pentagon press secretary George Little said Defense Secretary Leon Panetta was informed of the shooting Saturday morning. "This act is unacceptable, and the United States condemns it in the strongest possible terms," Little said.
He said Afghan Defense Minister Gen. Abdul Rahim Wardak called Panetta to apologize and to offer his condolences.
"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," Little's statement said. "Minister Wardak said that President (Hamid) Karzai was assembling the religious leaders, parliamentarians, justices of the Supreme Court and other senior Afghan officials to take urgent steps to do so."
In Kabul, Allen met with Afghan Interior Minister Bismillah Mohammadi, who pledged "complete cooperation in investigating today's tragedy and in taking stronger measures to protect ISAF personnel," Little said.
President Barack Obama called Allen after Saturday's shootings and the White House said the president supported the steps taken to protect U.S. service members in Afghanistan.
"We welcome President Karzai's statement ... encouraging peaceful expressions, and his call for dialogue and calm. 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-Qaida and strengthening the Afghan state," the White House statement added.
If the shootings are linked to Afghan forces, new questions will arise about Taliban infiltration as well as their ability to secure Afghanistan once NATO combat forces withdraw in 2014.
NATO is supposed to be moving away from a combat role to an advise-and-assist mission as early as next year. That will require NATO to place more staff in ministries.
"The fact that NATO is recalling staff from ministries suggests they are worried about a deep malaise in the Afghan security forces, that they expect more of these attacks," said Kamran Bokhari at STRATFOR global intelligence firm.
Saturday's attack comes as tensions between the Afghans and the Americans are high following the burning of copies of the Muslim holy book at a U.S. base that sparked days of deadly protests.
At least 28 people have been killed and hundreds wounded since Tuesday, when it first emerged that Qurans and other religious materials had been thrown into a fire pit used to burn garbage at Bagram Air Field, a large U.S. base north of Kabul. Among those dead were two U.S. soldiers who were killed Thursday by one of their Afghan counterparts while a riot raged outside their base in the eastern province of Nangarhar.
President Barack Obama and other U.S. officials apologized and said the burning of Qurans was a terrible mistake, but the incident has sent thousands to the streets in this deeply religious country.
In Kunduz, the capital of Kunduz province in northeast Afghanistan, more than 1,000 protesters demonstrated. At first they were peaceful, but as the protest continued they began throwing stones at government buildings and a U.N. office, said Sarwer Hussaini, a spokesman for the provincial police. He said the police were firing into the air to try to disperse the crowd.
The U.N. confirmed in a statement that its Kunduz compound was attacked, but said all its staff in Kunduz and in the country were unhurt and accounted for. The statement thanked Afghan security forces for their quick response to the assault.
NBC News' Jim Miklaszewski and Courtney Kube and The Associated Press and Reuters contributed to this report.
More from msnbc.com and NBC News: