REPORTING FROM KABUL, AFGHANISTAN -- A U.S. soldier went on a shooting rampage outside Kandahar city early Sunday, causing an unknown number of deaths and injuries, Afghan officials and the Western military said.

5:49 a.m. update: U.S. serviceman kills 16 in village shooting, Afghan officials say

The incident seemed certain to harden anti-American sentiment that flared into deadly riots last month after U.S. troops burned copies of the Koran at a base north of Kabul. U.S. officials have said the burning was a mistake and apologized, but some Afghans have brushed aside the apologies and called for harsh punishment of those involved.

The shooting early Sunday took place in Panjwayi district outside Kandahar city. The American soldier in question apparently slipped away from his base before dawn and was believed to have acted alone.

The NATO force issued a terse statement saying the shooter was in custody and the incident would be investigated by the U.S. military and Afghan authorities.

The military statement confirmed that there had been Afghan casualties, but did not say how many. It called the episode “deeply regrettable.”

The soldier’s motive was unknown, but during the Koran-burning riots, six U.S. service members were shot and killed by Afghan soldiers or, in the case of two of them, a worker at Afghanistan’s Interior Ministry. Two of the Americans who were killed were deployed in Kandahar province.

RELATED:

U.S. serviceman kills 16 in village shooting, Afghan officials say

U.S., Afghans agree on prisoner handover

Pakistan's Iran pipeline plan further strains ties with U.S.

-- Laura King