No person accused or convicted of an offence punishable under section 3 or section 4 shall, if in custody, be released on bail or on his own bond unless the prosecution has been given an opportunity to oppose the application for such release.