A U.S. soldier went on a shooting rampage in southern Afghanistan on Sunday, bursting into the homes of civilians in villages near his base in the middle of the night and killing up to 16 people, an Afghan minister told Reuters.

Minister of Border and Tribal Affairs Asadullah Khalid, who is investigating the incident, said the soldier entered three homes, killing 11 people in the first one.

Other Afghan officials said at least seven people died.

The incident came just weeks after U.S. soldiers burned copies of large numbers of Korans at a NATO base, triggering widespread anti-Western protests, and plunging already strained ties between Kabul and Washington to a new low.

The soldier has been detained and an investigation is underway, the NATO-led International Security Assistance Force (ISAF) coalition said.

Civilian casualties have been a major source of friction between President Hamid Karzai's Western-backed government and U.S.-led NATO forces in Afghanistan.

I cannot explain the motivation behind such callous acts, but they were in no way part of authorized ISAF military activity, ISAF deputy commander Lt. Gen. Adrian Bradshaw said in a statement.

(Reporting by Ahmad Nadem; Writing by Michael Georgy; Editing by Daniel Magnowski)