Criminal Code — C-46 527
Procuring attendance 527 (1) A judge of a superior court of criminal jurisdiction may order in writing that a person who is confined in a prison be brought before the court, judge, justice or provincial court judge before whom the prisoner is required to attend, from day to day as may be necessary, if (a) the applicant for the order sets out the facts of the case in an affidavit and produces the warrant, if any; and (b) the judge is satisfied that the ends of justice require that an order be made. Provincial court judge’s order (2) A provincial court judge has the same powers for the purposes of subsection (1) or (7) as a judge has under that subsection where the person whose attendance is required is within the province in which the provincial court judge has jurisdiction. Conveyance of prisoner (3) An order that is made under subsection (1) or (2) shall be addressed to the person who has custody of the prisoner, and on receipt thereof that person shall (a) deliver the prisoner to any person who is named in the order to receive him; or (b) bring the prisoner before the court, judge, justice or provincial court judge, as the case may be, on payment of his reasonable charges in respect thereof. Detention of prisoner required as witness (4) Where a prisoner is required as a witness, the judge or provincial court judge shall direct, in the order, the manner in which the prisoner shall be kept in custody and returned to the prison from which he is brought. Detention in other cases (5) Where the appearance of a prisoner is required for the purposes of paragraph (1)(a) or (b), the judge or provincial court judge shall give appropriate directions in the order with respect to the manner in which the prisoner is (a) to be kept in custody, if he is ordered to stand trial; or (b) to be returned, if he is discharged on a preliminary inquiry or if he is acquitted of the charge against him. Application of sections respecting sentence (6) Sections 718.3 and 743.1 apply where a prisoner to whom this section applies is convicted and sentenced to imprisonment by the court, judge, justice or provincial court judge. Transfer of prisoner (7) On application by the prosecutor, a judge of a superior court of criminal jurisdiction may, if a prisoner or a person in the custody of a peace officer consents in writing, order the transfer of the prisoner or other person to the custody of a peace officer named in the order for a period specified in the order, where the judge is satisfied that the transfer is required for the purpose of assisting a peace officer acting in the execution of his or her duties. Conveyance of prisoner (8) An order under subsection (7) shall be addressed to the person who has custody of the prisoner and on receipt thereof that person shall deliver the prisoner to the peace officer who is named in the order to receive him. Return (9) When the purposes of any order made under this section have been carried out, the prisoner shall be returned to the place where he was confined at the time the order was made. R.S., 1985, c. C-46, s. 527; R.S., 1985, c. 27 (1st Supp.), ss. 92, 101(E), 203; 1994, c. 44, s. 50; 1995, c. 22, s. 10; 1997, c. 18, s. 62; 2015, c. 3, s. 52(F)