Somalia's national security minister and at least 24 other people were killed in a homicide attack Thursday, and an extremist Islamic group with alleged links to Al Qaeda claimed responsibility.

President Sheik Sharif Sheik Ahmed accused Al Qaeda of being behind the bombing, which also killed a senior Somali diplomat. He did not offer any evidence, but the attack appeared to be another indication that Somali Islamic militants are adopting two tactics long used by Al Qaeda: homicide attacks and videos promoting their fundamentalist ideology.

In March, Usama bin Laden, the global terrorist network's leader, urged Somalis to overthrow Ahmed, calling him a tool of the United States in an audiotape that outlined Al Qaeda's ambitions in Somalia.

"It was an act of terrorism and it is part of the terrorist attack on our people," Ahmed told journalists in Mogadishu, his country's capital. "Al Qaeda is attacking us."

The bombing in western Somalia far outside Mogadishu — claimed by the Somali militant group al-Shabab — raised concerns that local insurgents are aiming to take out leaders of security forces to further cripple the country's weak, U.N.-backed government. Analysts say the insurgents have identified homicide attacks and assassinations as the best way to defeat the government.

National Security Minister Omar Hashi Aden was the second senior security official to be killed in as many days. Mogadishu's police chief died during fighting with Islamic insurgents in the capital on Wednesday that saw at least 34 people killed.

"Omar Hashi Aden's death is a huge blow to the government," said Ali Said Omar, director of the Nairobi, Kenya-based Center for Peace and Democracy, an independent research organization that works in Somalia.

The national security minister had become an important figure in the government because he was successfully recruiting militiamen to fight anti-government forces in central and southern regions Somalia where it has few allies, Omar told The Associated Press.

Belet Weyne, where Aden was killed, is the capital of the central Somalia region of Hiran.

Diplomats had described a surge in violence in May as a major push by the insurgents, backed by foreign Islamic militants, to topple the government in Mogadishu. But government forces managed to hold on to the few blocks in the capital they control as well as the air and sea port that are guarded by African Union peacekeepers.

During Thursday's homicide attack, witness Mohamed Nur said a small car headed toward the gate of the Medina Hotel in Belet Weyne, then drove into vehicles leaving the hotel and exploded.

Ali Mohamud Rage, a spokesman for al-Shabab, told local radio stations by telephone that his group carried out the attack and that one of its fighters died. "We killed the national security minister and the former ambassador to Ethiopia," said Rage, speaking from an undisclosed location.

The U.S. State Department considers al-Shabab a terrorist organization with links to Al Qaeda. Al-Shabab has denied that, but its use of homicide attacks has grown.

Before 2007, that terrorist tactic was unheard of in Somalia. But since then, it has occurred at least several times a year, directed at security forces or high ranking officials. In February, al-Shabab claimed it carried out two homicide attacks against African Union peacekeepers, killing 11 Burundian soldiers. More recently, the group claimed a teenage member carried out a homicideattack last month on a military base in Mogadishu, killing six guards and a civilian.

Experts have expressed fears that foreign Islamic militants could use Somalia as a base for terror in the region.

Somalia has not had an effective government for 18 years after warlords overthrew Mohamed Siad Barre and plunged the country into anarchy and chaos. The lawlessness also has allowed Somali pirates to flourish, making the nation the world's worst piracy hotspot.

Diplomats have said that up to 400 foreign Islamic militants backing local insurgents were involved in a surge of violence in Mogadishu in May that killed nearly 200 civilians. The U.N. says the conflict has displaced more than 122,000 people.

The United States accuses al-Shabab of harboring Al Qaeda-linked terrorists who allegedly blew up U.S. embassies in Kenya and Tanzania in 1998. The United States has attempted to kill suspected Al Qaeda members in Somalia several times with airstrikes.

Counterterrorism experts have long feared the nation is a haven for the terror network.

President Ahmed is a moderate Islamist who was elected in January under an intricate peace deal the U.N. mediated. His victory split the Islamic insurgency trying to topple the government for two years but did not put off hardline elements, who want to form a strict Islamic state in Somalia.

Al-Shabab, the main hardline group, has found it difficult to dislodge the government from its strongholds in Mogadishu and is seeking other ways to defeat it, said Ted Dagne, an Africa specialist with the U.S. Congress. "The suicide attack and assassinations are now seen as the most effective method to disorganize and disorient the government," Dagne told the AP.

Ahmed said the national security minister was on official business in Belet Weyne but did not elaborate. In recent weeks Aden had frequently gone to Belet Weyne, which is considered a strategic town because it is close to the Ethiopian border and is on a road that goes directly to Mogadishu.

Aden, a former police officer, had risen to the rank of colonel during dictator Mohamed Siad Barre's regime, the last effective central government in Somalia before the country descended into chaos. Aden later became a player in Somali politics and more recently had become an ally of Ahmed.