(1) Where a person is convicted in a State or Territory, on indictment, of a federal offence and the court before which the person is convicted is satisfied that:
(a) the person is suffering from a mental illness within the meaning of the civil law of that State or Territory; and
(b) the illness contributed to the commission of the offence by the person; and
(c) appropriate treatment for the person is available in a hospital in that State or Territory; and
(d) the proposed treatment cannot be provided to the person other than as an inmate of a hospital in the State or Territory;
the court may, without passing sentence on the person, make an order (in this section called a hospital order ) that the person be detained in a hospital specified in the order for a period specified in the order for the purposes of receiving treatment specified in the order.
(2) A court must not make a hospital order unless, but for the mental illness of the person, the court would have sentenced the person to a term of imprisonment.
(3) A court must not specify a period of detention in a hospital that is longer than the period of imprisonment to which the person would have been sentenced had the hospital order not been made.
(4) Where the court orders a person to be detained in a hospital for a specified period, the court may fix a lesser period of detention during which the person is not to be eligible to be released from the hospital.
(5) Before reaching an opinion on the matters specified in subsection (1) in relation to a person, the court must obtain and consider the reports of 2 duly qualified psychiatrists with experience in the diagnosis and treatment of mental illness.
(6) A court may make a hospital order in respect of a person even if the person is serving a federal sentence at the time when, under the order, the person is to begin to be detained in hospital and, where a hospital order is made in such circumstances:
(a) the hospital order is sufficient authority for the person to be detained outside the prison during the period of involuntary hospitalisation under the order; and
(b) the person is to be treated, for the purposes of that sentence, as serving that sentence during the period of involuntary hospitalisation under the order; and
(c) if the person is still liable to serve a part of that sentence when the hospital order ends or is discharged, the person is to be returned for that purpose to the prison where he or she was serving that sentence before the making of the order.
(7) Subsection (4) does not enable a court, in the case of a person who is serving a federal sentence at the time when the hospital order begins, to fix a lesser period of detention ending:
(a) if a non - parole period has been fixed in respect of the sentence--before the end of that non - parole period; and
(b) otherwise--before the end of that sentence.