Two NATO soldiers were shot and killed Thursday by an Afghan soldier amid protests objecting to Qur'an burnings that took place at a U.S. base earlier in the week.

Two protesters were also killed by Afghan police during the riot outside the American base in Nangarhar, in eastern Afghanistan.

Earlier Thursday, Afghan police shot and killed at least three protesters during two demonstrations in the north and south of the country.

District chief Mohammad Hassan said the two Americans were shot by a member of the Afghan National Army stationed at the base. Pentagon press secretary George Little later confirmed the two U.S. troops had died.

It was the latest in a rising spate of incidents where Afghan soldiers or police or militants wearing their uniforms, have shot and killed U.S. and NATO service members.

The fresh violence comes one day after clashes between Afghan troops and protesters broke out in the capital and in three eastern provinces over the incident, leaving at least seven people dead and dozens wounded.

The Qur'an burnings have roiled Afghans and set off riots in an illustration of the intensity of the anger at what they perceive as foreign forces flouting their laws and insulting their culture. The U.S. has apologized for the burnings, which took place at a military base near Kabul, and said it was a mistake.

President Obama issues apology

President Barack Obama apologized for the burning of Qu'rans and other religious texts.

The U.S.-led military coalition says the Muslim holy books were sent by mistake to a garbage burn pit at Bagram Air Field and the case is under investigation. The explanation and multiple apologies from U.S. officials have yet to calm outrage over the incident, which has also heightened tension between international troops and their Afghan partners.

The Taliban urged Afghans on Thursday to target foreign military bases and kill Westerners in retaliation for the burning of copies of the Qur'an at NATO's main base in the country as a third day of violent protests began, Reuters news agency reported.

Thousands of protesters, some shouting "Long live Islam!" and "Death to America!" staged demonstrations across Afghanistan for a third day.

In the eastern Laghman province, protesters hurled rocks on Thursday and tried to remove the razor wire from the perimeter of the American base in Mehterlam, the provincial capital.

An Afghan policeman runs after confiscating a U.S. flag from protesters in Kabul Thursday. The Taliban has urged Afghans to target foreign military bases and kill Westerners in retaliation for burnings of copies of the Qur'an.An Afghan policeman runs after confiscating a U.S. flag from protesters in Kabul Thursday. The Taliban has urged Afghans to target foreign military bases and kill Westerners in retaliation for burnings of copies of the Qur'an. (Omar Sobhani/Reuters)

The demonstrators failed to push through and get inside the walls of the facility, which also houses a U.S.-run provincial reconstruction team — a mix of military and international civilians who work to improve local governance, services and infrastructure.

The Laghman reconstruction team is made up of U.S. Army and Air Force service members, and staff from the State Department and the U.S. Agency for International Development.

"Hundreds of our people in Laghman province gathered because of the burning of the holy book by the Americans," said protester Mohammad Issa.

"Everyone is so emotional. The burning of Qur'an broke our hearts and we are attacking the PRT because they are American," he said, using the acronym for the provincial reconstruction teams.

Police managed to break up the demonstration using water cannons from fire trucks, batons and by firing above the heads of the demonstrators. From a nearby Afghan army base, Afghan soldiers also fired in the air.

"Very professionally we stopped them and ended the protest," said Daoud Barakzai, deputy police chief of Mehterlam. "All the firing was in the air."

He said two protesters were wounded by the gunfire and that most of the crowd of about 2,000 demonstrators were teenagers. Mehterlam is a city of about 100,000.

Two other demonstrations Thursday were peaceful. Local officials said 500 people demonstrated in the Khoshi district of Logar province and hundreds took to the streets in the eastern city of Jalalabad.

Karzai calls for calm

The civil unrest comes at a time when Afghan President Hamid Karzai is trying to negotiate a long-term partnership agreement with the United States to govern the activities of U.S. forces in Afghanistan after 2014, when most foreign combat troops will have left or taken on support roles.

Karzai said he shared the Afghan people's pain at hearing of the Qur'an desecration, but asked them in a statement late Wednesday to stay calm until an investigation is completed.

The violence was also a reminder of how easily Afghan-U.S. relations can deteriorate as the two countries work to forge a long-term partnership ahead of the withdrawal of foreign forces in 2014.

The unrest started Tuesday when Afghan workers at the main American military base, Bagram Air Field, saw soldiers dumping books in a pit where garbage is burned and noticed Qur'ans and other religious material among the trash.

The top U.S. and NATO commander, Gen. John Allen, quickly issued an apology and telephoned Karzai and major news organizations to explain that a collection of religious materials, including Qur'ans, had been mistakenly sent to be incinerated. As soon as someone realized what they were burning, they stopped and retrieved what was left, Allen said.

Four copies of the Qur'an were burned before the incineration was halted, according to initial Afghan government reports.

NATO and Afghan investigators Wednesday visited the Parwan detention facility, from where the Qur'ans had originated. U.S. officials said they had been taken from the shelves of the facility's library because they contained extremist messages or inscriptions. The White House said it was an accident that they were sent to be burned.