Anyone who is arrested and in the custody of the police should be produced before the nearest Magistrate within a period of twenty-four hours of their arrest. The police are required to produce every arrested person before the Magistrate to ensure that there have been legal grounds for the arrest of the person. Copies of all the documents including the memo of arrest should be sent to the concerned Magistrate for their record. In the instance of the accused person not being produced before the Magistrate, a Habeas Corpus petition can be filed.