22A. Orders by High Court of Justiciary and sheriff on conviction
(1) Subsection (2) applies where -
(a) the High Court of Justiciary (the "High Court") is dealing with a person who -
(i) has been convicted by or before the High Court of having committed a serious offence in Scotland, or
(ii) has been convicted by or before the sheriff of having committed a serious offence in Scotland and by virtue of section 195 of the Criminal Procedure (Scotland) Act 1995 has been remitted by the sheriff to the High Court for sentencing; or
(b) the sheriff is dealing with a person who has been convicted by or before the sheriff of having committed a serious offence in Scotland.
(2) The High Court or (as the case may be) the sheriff may, in addition to dealing with the person in relation to the offence, make an order if the High Court or (as the case may be) the sheriff has reasonable grounds to believe that the order would protect the public by preventing, restricting or disrupting involvement by the person in serious crime in Scotland.