Mogadishu, Somalia (CNN) -- Gunmen killed a Somali lawmaker Tuesday, witnesses and officials said, the second assassination of a member of parliament in Mogadishu in less than 24 hours.
Abdurasaq Mohamud, a local police officer, said that militants armed with pistols intercepted Abdulaziz Isaak Mursal as he was on his way to work from his home in Mogadishu's Dharkenley neighborhood. The attackers' vehicle stopped Mursal's car, and two gunmen got out and opened fire.
The gunmen fled and Somali security forces cordoned off the area, but the assailants escaped unharmed, Mohamud said.
Abdi Mohamed, a colleague of the deceased lawmaker, said Mursal was rushed to Medina hospital nearby, but doctors were unable to save him.
In a statement posted to the Internet, the Islamist rebel group Al-Shabaab claimed responsibility for Mursal's assassination and said its fighters have vowed to kill Somali officials and target foreign governments that support Somalia's government.
Somali Prime Minister Abdiwali Sheikh Ahmed condemned the violence.
"These acts of terror only serve to inflict indiscriminate violence, distress and grief on innocent people. Taking a human life is abhorrent, and these terrorists have destroyed an innocent family and stricken them with grief," he said in a statement issued Tuesday.
On Monday, another Somali lawmaker was killed and another injured when a bomb hidden in their car exploded while they were headed to a security conference, officials said.
Parliamentarian Isack Mohamed Ali, popularly known as Isack Rino, was killed, and lawmaker Mohamud Abdi-dhuuh was seriously injured, said Mohamed Abdiqadir Mohamed, district commissioner of Mogadishu's Hamarweyne district.
Al-Shabaab also claimed responsibility for Monday's bombing in a statement posted to a pro-militant website.
Ahmed said the two attacks were "deplorable," and "the use of terror will not derail us from the progress made in securing Somalia."
Journalists Mohamed Sheikh Nor and Abdulkadir Fooday reported from Mogadishu; CNN's Holly Yan wrote from Atlanta. CNN's Saad Abedine and Tara Kangarlou also contributed to this report.