The Associated Press

Somalia’s government signed an agreement with a powerful militia on Monday that offers high-level militants senior government positions in return for their military support during a long-planned offensive against an Islamist insurgency.

The agreement gave the Ahlu-sunah Wal-jamea militia five ministries as well as diplomatic posts and senior positions within the police and intelligence services.

The militia holds several towns and districts in central Somalia. The weak U.N.-backed government barely clings to a few blocks of the capital of Mogadishu with the help of more than 6,000 African Union peacekeepers.

The government came under attack by insurgents again on Monday as both sides traded mortar and machine gun fire after the president returned from Dubai. Casualty figures were not immediately available. Scores were killed in fighting last week.

Sheikh Mohamed Dahir Hefow, the militia’s head, signed the deal with Somali finance minister Sharif Hassan Sheik Aden at a ceremony held at the African Union’s headquarters in the Ethiopian capital of Addis Ababa.

Somalia’s Prime Minister Omar Abdirashid Ali Sharmarke said at the signing ceremony that the deal was part of a larger reconciliation plan.

“With this agreement, the government of Somalia and Ahlu-sunah Wal-jamea have taken an essential step in the strategy towards restoring peace and stability to our beloved country,” he said. “It is a victory for peace and a cursed defeat for spoilers and extremist groups.”

Analysts say Ahlu-sunah Wal-jamea have long enjoyed Ethiopian support, receiving money and weapons in return for trying to stop Somali Islamists from crossing the long, porous border into Ethiopia, where ethnically Somali rebels are already fighting against Ethiopia’s government.

Several residents of areas where moderate Islamists hold power welcomed the deal, but political analyst Issa Abdulahi warned of internal power struggles hurting the deal.

“This will militarily boast the government and will help (the militia) get wider support in their fight against (the insurgency),” Abdulahi said. “But it would be another problem if (militia) members disagree within themselves, when it comes to sharing the ministerial ranks.”

The militia was active in the 1990’s but grew prominent in 2008 after Somalia’s traditional Sufis were angered by the destruction of the tombs of their saints by hardline Islamists.

Ethiopia sent troops into Somalia in 2006 to topple the Islamists but withdrew a year ago amid concerns their presence was only fueling the conflict. Both Ethiopia and its archenemy Eritrea have repeatedly been accused of using Somalia to fight a proxy war.

Somalia, which has not had a central government for 19 years, is split not only between the Islamists and the government but also freelance clan militias.

Underscoring the difficulties, the same day the agreement was signed a senior militia official, Sheik Hassan Qoryoley, denounced it, saying there had not been enough consultation. He objected to a section that called for integrating the group’s fighters into government forces.

Associated Press Writers Malkhadir M. Muhumed in Nairobi, Kenya and Samson Haileyesus in Addis Ababa, Ethiopia contributed to this report.