Islamist militants killed Somalia's deputy chief prosecutor and will target more judiciary staff while the government tries to reform the courts, a militant spokesman said on Friday.
The al Shabaab rebel group, which is linked to al Qaeda, has fought for six years to impose its strict interpretation of Islamic law, or sharia, on Somalia.
The shooting of Ahmed Sheikh Nur Maalin, Somalia's deputy national prosecutor, on Thursday followed a wave of suicide bombings and shootings earlier this month in which 30 people were killed.
"It was part of our operation against courts and their men," Sheikh Abdiasis Abu Musab, spokesman for al Shabaab's military operation, told Reuters. "We shall also kill the remaining one by one."
The attacks were launched at a time when security in Mogadishu had been improving after two decades of civil war.
The government believes strengthening the rule of law and reforming the judiciary is vital but al Shabaab is determined to prevent it.
Donor countries are working with Somalia's new government to reform the judiciary, the police and the army.
Britain will host an international conference in London on May 7 on ways to bolster security, impose the rule of law and rebuild the nation. So far there has been slow progress on all three areas.