The United States carried out its first airstrikes against Islamic State militants in Somalia and killed "several terrorists," the U.S. military said Friday.

The Pentagon's Africa Command said the first strike was carried out at midnight Thursday and another one at 11 a.m. on Friday.

"Several terrorists" were killed, the military said in a statement, adding that the strikes were conducted in coordination with Somalia's government.

"U.S. forces will continue to use all authorized and appropriate measures to protect Americans and to disable terrorist threats," the statement said.

The Islamic State group has been gathering recruits in the region, although experts say the scale of its force is unclear and it remains a small player compared to the al-Shabab group.

Last month, a group loyal to the Islamic State seized a small port town in Somalia's semi-autonomous Puntland region, the first town it has taken since emerging a year ago.

The group, which refers to itself simply as Islamic State, is a rival to the larger al-Shabab force, which is linked to al-Qaida and once controlled much of Somalia.

The United States has occasionally carried out strikes against al-Shabab militants in Somalia, which retains a strong presence in parts of the south and center and carries out gun and bomb attacks.

The al-Shabab group aims to drive out the peacekeepers, topple Somalia's Western-backed government and impose its strict version of Islam on the Horn of Africa state.

More than 350 people were killed in twin bombings in the Somali capital of Mogadishu last month, the deadliest attack in the country's history.

Earlier this year, the White House granted the U.S. military broader authority to carry out strikes in Somalia against al-Shabab.