Two Americans who were shot dead Saturday inside the Interior Ministry in Afghanistan's capital Kabul are believed to be a colonel and a major in the U.S. military, Afghan security sources told Reuters.

A representative of NATO's International Security Assistance Force (ISAF) confirmed two of its service members had been shot dead in central Kabul by an individual who turned his weapon on them. The representative declined to say if the killer was a member of the Afghan military or police.

The killings took place during a fifth day of fierce anti-Western protests across the country over the burning of copies of the Quran, the Muslim holy book, at a NATO base.

That incident underscored the deep cultural divide that still exists more than 10 years after U.S. troops invaded to oust the Taliban and has deepened public mistrust of Western troops struggling to stabilize the country.

An Afghan security source, speaking on condition of anonymity, said the shooting of the two American officers in the Interior Ministry could be connected to the burning of the Qurans.

Muslims consider the Quran to be the literal word of God and treat each copy with deep reverence. Desecration is considered one of the worst forms of blasphemy.

Four Afghans were shot dead by Afghan security forces as demonstrators came out to the streets Saturday, with an attempt by protesters to bombard a United Nations compound in the north.

Despite an apology from U.S. President Barack Obama and a call for restraint from Afghanistan's President Hamid Karzai, thousands have taken to the streets. Twelve people were killed and dozens wounded Friday, the bloodiest day yet in demonstrations.

On Thursday, an Afghan national army soldier joined the protests and gunned down two American soldiers.

Attempts to Attack U.N. Building

Hundreds of people tried to overrun a compound in the northern Kunduz province housing workers from the U.N. Assistance Mission in Afghanistan (UNAMA), but were held back by police, Interior Ministry representative Sediq Sediqqi said.

A similar incident occurred last April when protesters angry over the burning of Qurans by an obscure pastor in the United States stormed a U.N. compound in northern Balkh province, killing seven.

The protests could dent plans for a strategic pact that Washington is considering with Kabul, which would allow a sharply reduced number of Western troops to stay in the country, well beyond their combat exit deadline.

(Writing by Amie Ferris-Rotman, editing by Ron Popeski and Rosalind Russell)