23 Bail applications.S
(1)Any person accused on petition of a crime which is by law bailable shall be entitled immediately, on any occasion on which he is brought before the sheriff prior to his committal until liberated in due course of law, to apply to the sheriff for bail, and the prosecutor shall be entitled to be heard against any such application.
(2)The sheriff shall be entitled in his discretion to refuse such application before the person accused is committed until liberated in due course of law.
(3)Where an accused is admitted to bail without being committed until liberated in due course of law, it shall not be necessary so to commit him, and it shall be lawful to serve him with an indictment or complaint without his having been previously so committed.
(4)Where bail is refused before committal until liberation in due course of law on an application under subsection (1) above, the application for bail may be renewed after such committal.
(5)Any sheriff having jurisdiction to try the offence or to commit the accused until liberated in due course of law may, at his discretion, on the application of any person who has been committed until liberation in due course of law for any crime or offence, except murder or treason, and having given the prosecutor an opportunity to be heard, admit or refuse to admit the person to bail.
(6)Where a person is charged on complaint with an offence, any judge having jurisdiction to try the offence may, at his discretion, on the application of the accused and after giving the prosecutor an opportunity to be heard, admit or refuse to admit the accused to bail.
(7)An application under subsection (5) or (6) above shall be disposed of within 24 hours after its presentation to the judge, failing which the accused shall be forthwith liberated.
(8)This section applies whether or not the accused is in custody at the time he appears for disposal of his application.