The United States has carried out an air strike in Somalia, killing more than 150 fighters with the al-Qaeda-linked Islamist group al-Shabaab, following U.S. intelligence on preparations for a large-scale militant attack, the Pentagon said on Monday.

The Saturday strike, using both manned aircraft and unmanned MQ-9 Reaper drones, targeted al-Shabaab's "Raso" training camp, a facility about 193 kilometres north of the capital Mogadishu, the Pentagon said.

The U.S. military had been monitoring the camp for several weeks before the strike and had gathered intelligence, including about an imminent threat posed by those in the camp to U.S. forces and African Union peacekeepers, officials said.

U.S. Air Force Secretary Deborah Lee James described the strike as "defensive" in nature. "There was intelligence ... these fighters would soon be embarking upon missions that would directly impact the U.S. and our partners," James told reporters. Two U.S. officials, speaking on condition of anonymity, said the targets were U.S. forces and African Union fighters in Somalia, but declined to offer additional details.

Captain Jeff Davis, a Pentagon spokesman, said the United States believed the threat was "imminent" and that the fighters were poised to soon depart the camp.

Al-Shabaab could not be reached for comment.

Somalia's Foreign Minister Abdusalam Omer said the Somali intelligence agency had provided information about the camp to the U.S. in the run-up to the attack.

"There has to be intelligence on the ground for this to happen. Our intelligence had helped," Omer told Reuters.

Al-Shabaab was pushed out of Mogadishu by African Union peacekeeping forces in 2011 but has remained a potent antagonist in Somalia, launching frequent attacks in its bid to overthrow the Western-backed government.

The group, whose name means "The Youth," seeks to impose its strict version of Shariah law in Somalia, where it frequently unleashes attacks targeting security and government targets, as well as hotels and restaurants in the capital.

Al-Shabaab was also behind deadly attacks in Kenya and Uganda, which both contribute troops to an African Union peacekeeping force in Somalia.

Omer said the U.S. drone strike was a major blow to al-Shabaab. 

"Instead of al-Shabaab attacking civilians, it was a military target that was hit and there was a high success rate," Omer said.

Davis said as many as 200 fighters were believed to be training at the Raso camp at the time of the strike and expressed confidence there were no civilian casualties.

"Their removal will degrade al-Shabaab's ability to meet the group's objectives in Somalia, which include recruiting new members, establishing bases and planning attacks on U.S. and Amisom forces there," Davis said.

He added that no U.S. forces on the ground participated in the strike, the largest in recent memory against the militant group, in terms of the number of fighters believed killed.

"It was an air operation," Davis said.