(1) This section applies where a court in England and Wales, or in Northern Ireland, is considering for the purposes of sentence the seriousness of an offence within subsection (5A) or (5B).
(2) If having regard to the material before it for the purposes of sentencing it appears to the court that the offence has or may have a terrorist connection, the court must determine whether that is the case.
(3) For that purpose the court may hear evidence, and must take account of any representations made by the prosecution and the defence, as in the case of any other matter relevant for the purposes of sentence.
(4) If the court determines that the offence has a terrorist connection, the court -
(a) must treat that fact as an aggravating factor, and
(b) must state in open court that the offence was so aggravated.
(5) In this section "sentence", in relation to an offence, includes any order made by a court when dealing with a person in respect of the offence.
(5A) An offence is within this subse
…