This is a really costly mistake, one for which a Somali soldier will be killed.

A court martial on Monday sentenced Ahmed Abdulahi Ahmed to death for killing a government minister after mistaking him for an Islamist militant.

Public works minister Abbas Siraji was shot dead on May 3, in his car in the capital, Mogadishu.

Soldier Ahmed Abdulahi Ahmed, was condemned to death by a military court “for mistakenly shooting the minister,” army officer Hassan Noor told Reuters.

A second soldier on the scene at the time was released without charge on Monday.

Siraji, 31, grew up in a Kenyan refugee camp and was the country’s youngest minister.

Militants from the al Qaeda-affiliated group, al Shabaab, have carried out frequent attacks in Mogadishu as they fight to oust Somalia’s Western-backed government and drive out African Union peacekeeping troops.