A Somali police officer says gunmen have shot and killed a Somali lawmaker in a drive-by shooting in the Somali capital, Mogadishu.

Capt. Mohamed Hussein said Monday that the attack on Abdullahi Qayad Barre took place in an area close to the presidential palace. He said gunmen traveling in a car sprayed bullets into the lawmaker's car as he was heading to parliament.

The terrorist group al-Shabab claimed responsibility for the attack, the latest in a string of violence targeting the country's legislators for assassination.

Al-Shabab militants killed five members of the Somali parliament last year, while two others survived similar attacks.