NATO says its soldiers were killed in eastern Afghanistan by "an individual wearing an Afghan National Army uniform" who turned his weapon on them.
The February 23 attack occurred just hours after the Taliban called on Afghans to target military bases and convoys of foreign troops -- urging people to "kill them, beat them, and capture them" -- in retaliation for the discovery three days earlier of Koran burnings at Bagram Air Field.
The Taliban said Afghans should target foreigners in order to "teach them a lesson that they will never again dare to insult the Holy Koran."
Afghan President Hamid Karzai's office meanwhile said U.S. President Barack Obama had sent a letter to Kabul formally apologizing to the Afghan people for the burning of the copies of the Koran. A statement from Karzai's offiice quoted Obama's letter as saying the incident was not intentional, and pledging a full investigation.
The NATO soldiers were killed at a U.S. base in the Khogyani district of Nangahar after men armed with assault rifles emerged from a protest and tried to storm the base.
"During protests, [when a group of demonstrators attacked the American base], the Americans shot at them -- killing three and wounding seven," one of the demonstrators and an eyewitness who declined to give his name told RFE/RL's Radio Free Afghanistan correspondent at the scene in Jalalabad. "The Afghan National Army came to our support and fired back at the Americans [from their post nearby] and then the Americans fired back at the Afghan soldiers."
Zia Ghildzai, a spokesman for the Nangahar governor, confirmed there was a gun battle between Afghan and U.S. troops but was unable to confirm the number of casualties or how many Afghan soldiers were involved in the clash.
"Yes, the incident has taken place," Ghildzai said. "We don't know the details. We are working on it."
Nangahar's police chief, Abdullah Stanekzai, said the demonstration was one of several in the province.
"We have arrested 35 people who we believe were provocateurs at these demonstrations, and among them, some of these men were armed," Stanekzai said.
Meanwhile, in the nearby province of Laghman, hundreds of demonstrators stormed another U.S. base on February 23 -- hurling rocks to vent anger over what U.S. officials described as the "improper disposal" of Islamic religious material.
Several hundred men marched on the headquarters of the U.S.-run Provincial Reconstruction Team in Laghman's capital, Mehtar Lam, after taking part in a nearby protest that had gathered about 2,000 people.
Afghan security forces fired warning shots and used water cannon to disperse the crowd. There were no immediate reports of casualties.
In the northern Afghan province of Baghlan, at least one protester was shot dead on February 23 when demonstrators tried to storm an Afghan police station.
Police say two protesters also were killed in an exchange of gunfire the same day at a protest in the southern province of Oruzgan.
That raises the number of people killed during three days of protests across Afghanistan to at least 14, including the two NATO soldiers.
Thousands of Afghans also took to the streets in Kabul and Jalalabad, as well as in the provinces of Logar, Nuristan and Kunar.
The White House, the Pentagon, and NATO all apologized for the burning of the Korans in the initial days after the revelation, calling it a mistake. U.S. Defense Secretary Leon Panetta said he had called for an investigation.
Afghan President Karzai on February 22 called for calm and expressed sadness over the loss of life.
Nonetheless, he appeared to blame a U.S. military officer for the burning of the Korans.
Speaking at Kabul's presidential palace, Karzai told Afghan lawmakers that the U.S. officer had acted "out of ignorance and with poor understanding" of the Koran's importance as Islam's holy book.
Taliban Mujahid said the Koran burning would not affect contacts with U.S. officials in Qatar aimed at building build confidence in a peace process and paving the way for a prisoner exchange.