Subsection (2) applies where a sentence of detention under section 250 is available by virtue of section 249(1).
The court may impose such a sentence if it is of the opinion that neither a youth rehabilitation order nor a detention and training order is suitable.
This is subject to (in particular) section 230 (threshold for imposing discretionary custodial sentence) and section 231 (length of discretionary custodial sentences: general provision).