By Abdi Sheikh

MOGADISHU (Reuters) - An air strike in northern Somalia left as many as 22 soldiers dead overnight, local officials said on Wednesday, and one region said the United States had been duped into attacking its troops.

Galmudug's Security Minister Osman Issa said 22 of his region's soldiers had been killed in the strike, adding that the rival neighboring region of Puntland had requested it on the pretext that the men were al Shabaab Islamist militants.

"Puntland misinformed the United States and thus our forces were bombed," he told Reuters.

In Washington, Pentagon spokesman Captain Jeff Davis told reporters that the United States had carried out a "self-defense air strike" after Somali troops faced fire from militants as they tried to stop an improvised explosive device (IED) making network.

Davis said that nine al Shabaab militants had been killed in the strike, but the Pentagon was looking into reports that the strike could have killed others.

"We will look at the reports to see if they are credible and if they are credible we'll investigate them," Davis said.

A Puntland police officer said the attack had killed "more than a dozen" members of al Shabaab, which is waging an insurgency against Somalia's Western-backed government and regional authorities.

Galmudug and Puntland regions have often clashed over territory.

The United States has launched many air strikes in Somalia, usually against al Shabaab.

Al Shabaab denied that it had any fighters in the area of the latest incident. "We neither have a base nor forces in Galkayo area," Sheikh Abdiasis Abu Musab, al Shabaab’s military operations spokesman, told Reuters.

Protesters in Galmudug's capital Galkayo burned U.S. flags and images of President Barack Obama in protest, witnesses said. Shops closed because of the demonstrations.

Somalia is trying to rebuild after two decades of war. The conflict that began in 1991 left the Horn of Africa nation riven by clan rivalries and struggling with an Islamist insurgency. Rival regions still sometimes take up arms against each other.

(Additional reporting by Idrees Ali in Washington; Writing by Katharine Houreld; Editing by Edmund Blair, Andrew Roche and Lisa Shumaker)