Prisons (Scotland) Act 1989

13Legal custody of prisoner

A person shall be deemed to be in legal custody—

(a)while he is confined in or being taken to or from any prison in which he may be lawfully confined; or

(b)while he is working or is, for any other reason, outside the prison in the custody or under the control of an officer of the prison; or

(c)while he is being taken to any place to which he is required or authorised by or under this Act to be taken; or

(d)while he is kept in custody in pursuance of such requirement or authorisation.