(1) Every person shall be entitled to his personal liberty and no person shall be deprived of his personal liberty except in the following cases and in accordance with procedure permitted by law—
(a) in execution of a sentence or order of a court in respect of a criminal offence of which he has been convicted; or
(b) in execution of an order of a court punishing him for contempt of court; or
(c) for the purpose of bringing him before a court in execution of an order of a court; or
(d) in the case of a person suffering from an infectious or contagious disease, a person of unsound mind, a person addicted to drugs or alcohol or a vagrant, for the purpose of his care or treatment or the protection of the community; or
(e) for the purpose of the education or welfare of a person who has not attained the age of eighteen years; or
(f) for the purpose of preventing the unlawful entry of that person into Ghana, or of effecting the expulsion, extradition or other lawful removal of that per-son from Ghana or for the purpose of restricting that person while he is being lawfully conveyed through Ghana in the course of his extradition or removal from one country to another; or
(g) upon reasonable suspicion of his having committed or being about to commit a criminal offence under the laws of Ghana.
(2) A person who is arrested, restricted or detained shall be informed immediately, in a language that he understands, of the reasons for his arrest, restriction or detention and of his right to a lawyer of his choice.
(3) A person who is arrested, restricted or detained—
(a) for the purpose of bringing him before a court in execution of an order of a court; or
(b) upon reasonable suspicion of his having committed or being about to commit a criminal offence under the laws of Ghana, and who is not released,
shall be brought before a court within forty-eight hours after the arrest, restriction or detention.
(4) Where a person arrested, restricted or detained under paragraph (a) or (b) of clause (3) of this article is not tried within a reasonable time, then, without prejudice to any further proceedings that may be brought against him, he shall be released either unconditionally or upon reasonable conditions, including in particular, conditions reasonably necessary to ensure that he appears at a later date for trial or for proceedings preliminary to trial.
(5) A person who is unlawfully arrested, restricted or detained by any other person shall be entitled to compensation from that other person.
(6) Where a person is convicted and sentenced to a term of imprisonment for an offence, any period he has spent in lawful custody in respect of that offence before the completion of his trial shall be taken into account in imposing the term of imprisonment.
(7) Where a person who has served the whole or a part of his sentence is acquitted on appeal by a court, other than the Supreme Court, the court may certify to the Supreme Court that the person acquitted be paid compensation; and the Supreme Court may, upon examination of all the facts and the certificate of the court concerned, award such compensation as it may think fit; or, where the acquittal is by the Supreme Court, it may order compensation to be paid to the person acquitted.