arrested and detained in custody shall be produced be­ fore the nearest magistrate within a period of 24 hours of such arrest excluding the time necessary for the jour­ ney from the place of his arrest to the court of the ma­ gistrate and no such person shall be detained in custody beyond the said period without the authority of a mag­ istrate. Section 50 of the Criminal Procedure Code, 1973, also provides that the person arrested shall be in­ formed of the grounds of his arrest and of the right to bail. No police officer shall detain in custody a person without warrant for a longer period than under all the circumstances of the case is reasonable, and such pe­ riod shall not in the absence of a special order of the magistrate exceed 24 hours exclusive of the time neces ­ sary for the journey from the place of arrest to the mag­ istrate ’s court. Section 309 of the Criminal Procedure Code specifically enjoins that in every inquiry or trial, the proceedings shall be held as expeditiously as poss ­ ible. In short, speedy trial is a fundamental right of an accused implicit in article 21 of the Constitution. (Kadra Pehadiya v. State of Bihar, AIR 1981 at pp. 940-941.) 59. Apart from the provisions made for punish ­ ments for wrongful confinement under the Indian Penal Code, the High Courts of India have also been empow ­ ered to issue the writ of habeas corpus, which is a pre­ rogative process for securing the liberty of the subject and also an effective means of immediate release from unlawful deprivation whether in a prison or in private custody. Accordingly, the Court can command the pro­ duction of the detained person and inquire into the 