A U.S. soldier shot and killed an Afghan boy on Monday near an American airfield close to the capital Kabul, a senior Afghan police officer said.

The boy, whose age is unknown, had been carrying what looked like an automatic rifle near the Bagram Airfield, 50 kilometers (31 miles) from Kabul in neighboring Parwan province, said the provincial police chief, Gen. Zaman Mamozai.

An American soldier had warned the boy from a watchtower to stop, he said.

Local people gathered near the base to protest the killing, but dispersed once they were told about the circumstances, Mamozai said. He said the incident is being investigated.

Bagram officials could not immediately be reached for comment.

Army Brig. Gen. Charles H. Cleveland, spokesman for U.S. forces in Afghanistan, said the U.S. military was looking into the incident.

Earlier, an Afghan official said overnight attacks by the Taliban on two police checkpoints in the volatile southern Helmand province killed at least eight police.

Col. Almas Kahn, deputy police chief in Helmand, said the attack happened in the Gereshk district around midnight.

Though Kahn blamed the Taliban, the group did not immediately claim responsibility for the attack. Afghan forces have been trying to reduce the number of checkpoints as they are vulnerable to insurgent attacks.

In the southern Uruzgan province, an official said that two days of fighting between police and insurgents in the Charchino district had left 12 police and 20 Taliban dead.

District police chief Wali Dad said around a dozen police checkpoints had been attacked by Taliban gunmen, wounding another 27 police. Fighting was still going on.

"If we don't get support and reinforcements soon we might lose the whole district," he said.

Taliban spokesman Qari Yousaf Ahmadi claimed responsibility for Uruzgan attacks.

Separately, the Taliban claimed responsibility for firing a series of rockets at Kabul's new parliament building early Monday. No casualties were reported.

Rockets are occasionally fired at government and diplomatic areas in Kabul, but casualties are rare and the capital has seen few deadly attacks in recent months.