Updated

Gunmen opened fire on people leaving a mosque in Somalia's capital, killing one of the country's senior U.N. officials and wounding his son and another man, a witness and a family member said.

Attacks on officials, including those working for the U.N. or aid agencies, are common in Somalia, where Islamic insurgents have vowed to fight an Iraq-style insurgency against the weak and corrupt U.N.-supported government.

Osman Ali Ahmed, the head of the U.N. Development Program for Somalia, was covered in blood and unconscious as he was rushed to a hospital after Sunday night's shooting, said Hassan Ali, a witness and a neighbor of Ahmed's. Ali said in an interview that it was not clear how badly Ahmed's son and the other man were hurt.

Ahmed's wife, Masteho Abubakr Yusus, later told The Associated Press that her husband died at the African Union hospital after being shot in the head.

The shooting occurred a day after an explosion killed a Somali official, his wife and four others in Mogadishu.

On June 21, Hassan Mohamed Ali, head of the U.N. High Commissioner for Refugees organization in Mogadishu, was abducted from his home on the outskirts of the capital.

In December 2006, Somali soldiers and their Ethiopian allies ousted Islamist insurgents who had taken over the capital. Since then, the insurgents have been battling the transitional government. The Islamists had ruled Mogadishu and much of southern Somalia for six months.

Ethiopian and Somali government forces come under daily attack in the capital.

Somalia has not had a functioning government since 1991, when warlords overthrew dictator Mohamed Siad Barre and turned on each other.

The current conflict is complicated by the involvement of arch enemies Eritrea and Ethiopia, who support the opposing sides, and a complicated web of clan loyalties.