The U.N.'s representative to Somalia on Sunday condemned the killing of a Somali member of parliament.
Politician Mustafa Haji Maalim was killed by gunmen on Saturday, the U.N. said. Al-Shabab claimed the attack Sunday through its Twitter account.
The al-Qaida-linked militant group has been fighting the Somali government for nearly five years. Africa Union forces pushed al-Shabab out of Mogadishu in August 2011 but the militants have continued to carry out suicide attacks in the capital. Government figures in Somalia are frequently targeted for death.
The U.N.'s special representative to Somalia, Augustine Mahiga, condemned the shooting and called it a cowardly attack.
Somali leaders seated a new parliament last month as part of a changeover in government. Those parliamentarians then voted in new President Hassan Sheikh Mohamud this month. The 56-year-old academic and activist is expected to form the country's first functioning central government since 1991, when warlords overthrew a longtime dictator. Al-Shabab had opposed Mohamud's election, saying it had been manipulated by Western powers.
Mohamud survived an assassination attempt by al-Shabab on his second day in office Sept. 12 when two suicide bombers blew themselves up while trying to gain access into a heavily guarded hotel that serves as his temporary residence. Five died in the attack, including the three attackers.
On Thursday the militant group also targeted a Mogadishu cafe frequented by politicians, killing at least 14 people.