Section 810.1 of the Criminal Code of Canada provides that a judge may pass an order imposing certain conditions on a person lest that person commits a sexual offence (for example, sexual assault or sexual contact) against a person of less than 16 years old.
This procedure, which is related to a peace bond or recognizance to keep the peace, is used sometimes as a tool by a criminal defense lawyer in order to negotiate dropping the charges. This is only possible in rare occasions, when certain conditions are all present. As an example, see the case of sexual offence recently defended by Mr. Xavier Cormier.