18. Bail and custody of juveniles. –
(1) When any person accused of a bailable or non-bailable offence and apparently a juvenile is arrested or detained or appears or is brought before a Juvenile Court, such person shall, notwithstanding anything contained in the Code of Criminal Procedure, 1973 (2 of 1974), or in any other law for the time being in force, be released on bail with or without surety but he shall not be so released if there appear reasonable grounds for believing that the release is likely to bring him into association with any known criminal or expose him to moral danger or that his release would
defeat the ends of justice.
(2) When such person having been arrested is not released on bail under sub-section (1) by the officer-in-charge of the police station, such officer shall cause him to be kept in an observation home or a place of safety in the prescribed manner (but not in a police station or jail) until he can be brought before a Juvenile Court.
(3) When such person is not released on bail under sub-section (1) by the Juvenile Court it shall, instead of committing him to prison, make an order sending him to an observation home or a place of safety for such period during the pendency of the inquiry regarding him as may be specified in the order.