Terrorism Act 2000 (Chapter 11) s43

The Law

s43 Search of persons.

(1) A constable may stop and search a person whom he reasonably suspects to be a terrorist to discover whether he has in his possession anything which may constitute evidence that he is a terrorist.
(2) A constable may search a person arrested under section 41 to discover whether he has in his possession anything which may constitute evidence that he is a terrorist.
(3) A search of a person under this section must be carried out by someone of the same sex.
(4) A constable may seize and retain anything which he discovers in the course of a search of a person under subsection (1) or (2) and which he reasonably suspects may constitute evidence that the person is a terrorist.
(5) A person who has the powers of a constable in one Part of the United Kingdom may exercise a power under this section in any Part of the United Kingdom.

SceneThat comment

A police officer may stop and search someone under section 43 of the Terrorism Act 2000 - providing that they reasonably suspect that the person is a terrorist. If you are stopped you should respectfully ask why you are suspected of being terrorist.