Harakat al-Shabaab al-Mujahideen, usually referred to as al-Shabaab (“the youth”), is mostly known as a Somali terrorist group. But since the end of 2008 it has functioned as a state power in large parts of Southern and Central Somalia. In this study I sketch out the structure and function of the legal system of the group. Over the last three years they have developed an administrative structure and a legal system which is unprecedented in the Somali conflict, which has lasted for more than 20 years. In order to establish law and order in their territories al-Shabaab has applied their own version of sharī’a and issued strict religiously inspired decrees. The present study is based on information acquired through interviews with Somali refugees in Nairobi who have direct experiences with al-Shabaab’s judicial practice. It reveals that al-Shabaab’s application of criminal law follows the inherent logic of classical Islamic legal doctrines on several points. However, the al-Shabaab courts tend to overlook many of the strict requirements regarding evidence and procedure which was outlined by the medieval Muslim scholars in order to humanize Islamic law. This is especially evident in cases of the so-called ḥadd (pl. ḥudūd) crimes, i.e. offences where the punishments (e.g. stoning, lashing and amputation) are described in the Qu’rān and the haḍīth-literature. Therefore, the legal reality under al-Shabaab’s regime is far more brutal than under most other Islamic inspired regimes in the contemporary Muslim world. Al-Shabaab’s practice of Islamic criminal law is not only a means to exercise control through fear but may also be seen as an effective way of filling the vacuum of insecurity and instability after twenty years of violence and absence of state institutions in its territories. In order to understand Al-Shabaab’s current practice of criminal law, I argue, one has to take into consideration the group’s Jihadi-Salafi affiliation. According to Salafi notions sharī’a is not only a means to an end, but an end in itself. As such sharī’a, i.e. God’s divine law, is the visual symbol of an Islamic state. Consequently, the application of Islamic criminal law, especially the ḥudūd punishments, provides al-Shabaab with religious and political legitimazy. The fact that corporal punishments and executions are frequently enforced in public is in many respects more important than whether the criminal proceedings are in accordance with the strict requirements outlined in classical legal doctrines.