Somali Islamist insurgents have imported terrorist tactics and technology used with deadly results in Iraq and Afghanistan, threatening the African country's beleaguered government and causing alarm as far as Washington.

Somali fighters over the past two years have gone from simply throwing grenades into crowded rooms to building advanced remote-controlled bombs. Analysts fear that the transfer of tactics and technology may strengthen ties between Somali Islamists and al-Qaida.

The Somali insurgents offer refuge to terrorists and may also provide territory for training for a strike on the West, said Juan Zarate, the former U.S. Deputy National Security Adviser for Combating Terrorism. Recruits in jihadist training camps in Somalia are already taught how to use firearms and explosives, according to local and U.S. officials.

The U.S. military wrote an urgent internal report earlier this year after a cache of bomb-making materials with sophisticated triggering devices was found in Somalia.

"People are very concerned that technology from Iraq and Afghanistan is being transferred to Somalia," said Zarate, who is now a senior adviser at the Washington-based Center for Strategic and International Studies.

The increasing sophistication of attacks came amid an influx of hundreds of foreign jihadi fighters to the lawless Horn of Africa state over the last year. Experts are uncertain, however, whether the new tactics and technology are being brought by Somalis who fought abroad, freelance jihadi fighters or al-Qaida-linked figures.

In the latest Iraq- or Afghan-style attack, a suicide bomber wearing women's clothing detonated explosives last week during a university graduation in the tiny portion of Mogadishu under government control. The blast killed 24 people, including three Cabinet ministers.

Somalia's most dangerous militant group — al-Shabab, which has ties to al-Qaida — denied it was behind the bombing. Taliban militants, blamed for most suicide bombings in Afghanistan, also typically deny responsibility for blasts that kill many civilians and cause outrage.

"What happens in Somalia is not original tactics, it is a copy of what happens in Iraq and Afghanistan," said Somali Information Minister Dahir Gelle. "We understand where (the insurgents) train and who is sending them ... The coordination and tactics and sophistication comes from al-Qaida."

Although Somalia has been at war for nearly two decades, suicide bombs were unheard of there until 2007.

The first complex bomb attack in Somalia occurred in October 2008, when five nearly simultaneous suicide bombings claimed 21 lives. Since then, there have been three suicide attacks on African Union peacekeeping bases in the capital, Mogadishu. A suicide bomber also killed the security minister and 24 others in June. Al-Shabab claimed responsibility.

"They prepare, they plan, they are very smart," Roland Marchal, a Somalia expert at the Center for International Studies and Research in Paris. Marchal said tactics are still crude compared to Iraq and Afghanistan but are evolving.

Two regional analysts said the type of bombs and their deployment shows the insurgents are using more sophisticated tactics. The analysts spoke on condition of anonymity because they are not authorized to speak publicly on the matter.

Bomb-makers are aiming to maximize damage by using metal fragments known as "shipyard confetti," one analyst said. Militants once simply taped nuts and bolts to anti-tank mines but are now using heavier iron construction rods that have been partially sawed through to cause more grievous wounds.

Triggering devices commonly used in the Middle East also have made their way to Somalia.

After a twin suicide truck-bomb attack in September on an African Union base in Mogadishu, two dead pedestrians were found wearing suicide vests packed with ball bearings, a security analyst said. These men were apparently going to attack security services and medical personnel rushing to the scene but wound up being killed themselves when the trucks blew up.

The activation devices for their own bombs used keyless entry systems of the kind used to open garage doors or cars. The analyst said the bombs also featured apparent "chicken switches," also commonly used in the Middle East and that allow other people to detonate a bomb if the bomber's nerves fail.

Zarate said the improved capability might eventually work against the Somali insurgents if the government can persuade the population, which traditionally reacts badly to foreign forces, that it shows outsiders are taking over the insurgency.