Related Rule
Somalia
Practice Relating to Rule 127. Respect for Convictions and Religious Practices of Persons Deprived of Their Liberty
Somalia’s Military Criminal Code (1963) states:
382. Arbitrary refusal to recognize the status of a lawful belligerent. – A commander who causes serious harm to lawful enemy belligerents who have fallen into his power … by not according them the treatment prescribed by law or by international agreements … shall be punished, unless the act constitutes a more serious offence, by military confinement for not less than three years.
397. Violation of freedom of religion or worship. — Without prejudice to the application of the measures to maintain order prescribed by the military authority, anyone who arbitrarily prevents or disrupts or otherwise restricts the freedom of religion or worship of prisoners of war shall be punished by military confinement for up to one year. 
Somalia, Military Criminal Code, 1963, Articles 382 and 397.
In 2011, in its report to the Human Rights Council, Somalia stated:
Somalia has not ratified AP II [1977 Additional Protocol II] and it is therefore not directly applicable to Somalia as a matter of treaty law. The Government is aware that many provisions of AP II represent customary IHL rules and therefore apply to the situation in Somalia. Such provisions include Article 4 providing guarantees to persons taking no active part in hostilities [and] Article 5 prescribing humane treatment of persons whose liberty ha[s] been restricted … due to the fact that these norms are reflected in Common Article 3 of the [1949] Geneva Conventions. 
Somalia, Report to the Human Rights Council, 11 April 2011, UN Doc. A/HRC/WG.6/11/SOM/1, § 75.