Discuss as:

Two NATO soldiers killed by gunman thought to be Afghan police officer

The Taliban indicate that deadly attacks on U.S. personnel in Afghanistan were in response to an anti-Islam video. NBC's Atia Abawi reports.

KABUL -- A man thought to be an Afghan policeman killed two NATO soldiers in southern Afghanistan's Helmand Province on Saturday before he was himself shot dead, security and coalition officials said.

The incident follows an attack Friday on NATO's Camp Bastion in Helmand Province. Two U.S. Marines were killed at the base, where Britain's Prince Harry is stationed.

The Taliban claimed responsibility for the base attack, saying it was in response to the anti-Islamic video that has caused rioting around the Muslim world.

Camp Bastion came under mortar, rocket-propelled grenade and small arms fire late Friday in an attack in which several servicemen were wounded and the base was damaged. NATO said all of the nearly 20 attackers were killed except for one, who was hospitalized.

Saturday's deaths brought to 47 the number of foreign military personnel killed in insider attacks this year. The names and nationalities of the slain soldiers were not immediately released.

Related: 2 U.S. Marines killed in attack on NATO base

The gunman was returning from a security operation in Helmand with coalition soldiers when he turned his gun on them, a security source told Reuters. He killed two soldiers and wounded three others.

A soldier returned fire, killing the attacker, a statement from the International Security Assistance Force (ISAF) said.

It was not immediately clear from which country the dead soldiers were.

The gunman was believed to be a member of the 16,000-strong Afghan Local Police, a U.S.-trained militia separate from the police. Training of new recruits was suspended earlier this month following a rise in insider attacks. 

More world stories from NBC News:

Follow World News from NBCNews.com on Twitter and Facebook