(1) This section applies to an indictable offence that can be heard and determined summarily if the Magistrates Court is of the opinion that the case can properly be disposed of summarily having regard to—
(a) any relevant representations made by the accused; and
(b) any relevant representations made by the prosecutor in the presence of the accused; and
(c) the circumstances and, in particular, the degree of seriousness of the case; and
(d) any other circumstances that appear to the Magistrates Court to make it more appropriate for the case to be dealt with on indictment rather than summarily.
(2) If this section applies and—
(a) the Magistrates Court decides as mentioned in section 315C or section 315D (9) that the accused charged with a serious offence is unfit to plead; and
(b) after hearing the charge, the Magistrates Court is satisfied beyond reasonable doubt that the accused engaged in the conduct required for the offence charged;
the Magistrates Court shall order that the accused be detained in custody until the ACAT orders otherwise unless, in consideration of the criteria for detention in section 308, it is satisfied that it is more appropriate to order that the accused submit to the jurisdiction of the ACAT to enable the ACAT to make a mental health order or forensic mental health order.
(3) If, under subsection (2), the Magistrates Court is satisfied that it is more appropriate to order that the accused submit to the jurisdiction of the ACAT to enable the ACAT to make a mental health order or forensic mental health order, it shall make an order to that effect.
(4) If this section applies and—
(a) the Magistrates Court decides as mentioned in section 315C or section 315D (9) that the accused charged with an offence other than a serious offence is unfit to plead; and
(b) after hearing the charge, the Magistrates Court is satisfied beyond reasonable doubt that the accused engaged in the conduct required for the offence charged;
the Magistrates Court may make any orders it considers appropriate, including the following:
(c) that the accused be detained in custody until the ACAT orders otherwise;
(d) that the accused submit to the jurisdiction of the ACAT to enable the ACAT to make a mental health order or forensic mental health order.
(5) The Magistrates Court shall conduct a hearing under this section as nearly as possible as if it were a normal criminal proceeding.
(6) In a hearing under this section—
(a) if legal representation is available to the accused—the accused shall have legal representation unless the Magistrates Court otherwise orders; and
(b) the accused is to be taken to have pleaded not guilty in respect of the offence charged.
(7) If the Magistrates Court is satisfied beyond reasonable doubt that the accused engaged in the conduct required for the offence charged, the finding—
(a) is not a basis in law for recording a conviction for the offence charged; and
(b) except as provided in section 335A, bars further prosecution of the accused for any offence in relation to the conduct.
(8) In this section:
"serious offence" means—
(a) an offence involving actual or threatened violence; or
(b) an offence against section 27 (3) or (4).