Washington: US President Barack Obama telephoned the top American commander in Afghanistan on Saturday to discuss the ongoing violence over the Quran burning.

Obama thanked General John Allen, commander of the US and NATO forces in Afghanistan, for the "measures he is taking to protect our service members and civilians", the White House said in a statement.

Washington "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," an agency quoted the statement as saying.

Two US soldiers were killed in a shooting at the Afghan interior ministry on Saturday. The shooting occurred on the fifth day of protests across Afghanistan over the burning of Quran by US forces at Bagram military base.

Over 30 people have died and about 180 others were injured since protests broke out over the incident on Tuesday.

The NATO has recalled its forces guarding the ministries and other government installations in Kabul, the International Security Assistance Force (ISAF) said  on Saturday.

"We are investigating the crime and will pursue all leads to find the person responsible for this attack," the ISAF said in a statement.