b) Detention or remand in custody due to strong indications of the wilful commission of a crime that is punishable by imprisonment for a maximum term of more than three years; c) The imprisonment or detention of, or the imposition of any other coercive measure subject to judicial control on, a person who improperly entered or improperly remains in Portuguese territory, or who is currently the object of extradition or deportation proceedings; d) The disciplinary imprisonment of military personnel, subject to the guarantee of appeal to the competent court; e) The subjection of a minor to measures intended to protect, assist or educate him in a suitable establishment, when ordered by the competent court of law; f) Detention by judicial decision for disobeying a court decision or to ensure appearance before a competent judicial authority; g) Detention of suspects for identification purposes, in the cases that are and for the time that is strictly necessary; h) Committal of a person suffering from a psychic anomaly to an appropriate therapeutic establishment, when ordered or confirmed by a competent judicial authority. 4. Every person who is deprived of his freedom must immediately be informed in an understandable manner of the reasons for his arrest, imprisonment or detention and of his rights. 5. Deprivation of freedom contrary to the provisions of the Constitution or the law places the state under a duty to compensate the aggrieved person in accordance with the law. Article 28 (Remand in custody) 1. Within a time limit of at most forty-eight hours, all detentions shall be submitted to judicial consideration with a view to either the detainee’s release or the imposition of an appropriate coercive measure. The judge must become acquainted with the reasons that caused the detention and must inform the detainee thereof, question him and give him the opportunity to present a defence. 2. Remand in custody is exceptional in nature and shall not be ordered or maintained whenever it is possible to grant bail or apply another, more favourable measure provided for by law. 3. The judicial decision to institute or maintain a measure entailing the deprivation of freedom shall immediately be communicated to the relative or person of trust nominated by the detainee. 4. Remand in custody is subject to the time limits laid down by law. Article 29 (Application of criminal law) 1. No one may be sentenced under the criminal law unless the action or omission in question is punishable under a pre-existing law, nor may any person be the object of a security measure unless the prerequisites therefore are laid down by a pre-existing law. 2. The provisions of the previous paragraph do not preclude the punishment up to the limits laid down by internal Portuguese law of an action or omission which was deemed criminal under the general principles of international law that were commonly recognised at the moment of its commission.

Select target paragraph3