People who are in jail while their trial is going on are called under-trials prisoners. As trials in India go on for years together, under-trial prisoners should be protected from being in jails for long periods of time without being proved guilty of committing the crime. The law has provisions of Bail to protect undertrials.
If a person has been arrested for a crime and has been in prison while undergoing trial for up to half of the maximum period of imprisonment specified for the crime that they have committed, the Court must order to release them.
However, if the Court find enough reasons, it can order continued detention of the under-trial prisoner, even after they have been in prison for one half of the punishment.