Mr McCann suffers from a mental disorder and was detained in the State Hospital at Carstairs following his conviction for a number of offences. On 5 December 2011 the State Hospital Board for Scotland (the Board) implemented a comprehensive smoking ban in the State Hospital. A partial ban had previously been implemented allowing smoking in the grounds but this had created operational difficulties. The comprehensive ban prohibited a detained patient from smoking or possessing tobacco products in the State Hospital, including in its grounds, and from smoking on home visits. The ban also prohibited visitors from bringing tobacco products into the hospital. Procedures were established to search both patients and visitors for such products. Mr McCanns challenge relates only to (a) the ban on smoking in the grounds and on home visits, which, by creating a comprehensive ban, prevents detainees from smoking anywhere and (b) the ban on possession and powers of search and confiscation. Mr McCann challenges the legality of the comprehensive smoking ban on three grounds. First, he argues the decision to implement the smoking ban was unlawful as it did not adhere to the principles in section 1 of the Mental Health (Care and Treatment) (Scotland) Act 2003 (the 2003 Act) or comply with the requirements of the Mental Health (Safety and Security) (Scotland) Regulations 2005 (the 2005 Regulations). Section 1 of the 2003 Act contains a statement of principles for the discharge of functions under that Act, which include an obligation to minimise restrictions on the freedom of the patient. The 2005 Regulations were made under section 286 of the 2003 Act which is headed Safety and security in hospitals. The 2005 Regulations authorise the placing of restrictions on items that specified patients and their visitors may have in hospital and the removal from them of prohibited items. They require that the specified patient must be informed when any measure is to be applied to them and that records are kept of any searches. The Board contends that in deciding upon and implementing the smoking ban and measures to enforce that ban, it acted solely under its power of management in section 102(4) of the National Health Service (Scotland) Act 1978 (the 1978 Act). As such, it submits that it was not required to comply with the 2003 Act section 1 principles. Secondly, Mr McCann submits that the decision unjustifiably interfered with his right to respect for his private life under Article 8 of the European Convention on Human Rights (ECHR). Thirdly, he argues that the Board, by implementing the smoking ban, treated him in a discriminatory manner contrary to Article 14 ECHR when taken with Article 8 EHCR. He submits that the discriminatory treatment cannot be objectively justified when compared with (i) people in prison, (ii) patients in other hospitals (whether detained or not) or (iii) members of the public at liberty. The Supreme Court unanimously allows Mr McCanns appeal but only to the extent that the part of the impugned decision, which relates to the prohibition from possession of tobacco products and the powers of search and confiscation, does not comply with the 2003 Act and 2005 Regulations. Lord Hodge gives the lead judgment, with which the other Justices agree. Mental Health (Care and Treatment) (Scotland) Act 2003 The Board is correct that the comprehensive ban, viewed on its own, involves the exercise of a power of management under the 1978 Act. However, the supporting prohibition from possession of tobacco products and the power to search for and confiscate such products fall within the scope of the 2003 Act and the 2005 Regulations [34]. The 2005 Regulations do not set limits on the items which may be prohibited or searched for. The focus of section 286 and the 2005 Regulations is on the regulation of activities which impinge on the autonomy of individuals [38]. The devising of such policies which concern the detained patients autonomy and the carrying out of such measures have thus become functions under the 2003 Act and the section 1 principles apply to such measures in so far as they are relevant [38 39]. One relevant principle is the obligation in section 1(4) to discharge the function in a manner that involves the minimum restriction on the freedom of the patient that is necessary in the circumstances [39]. In instituting the comprehensive smoking ban there was no consideration of this principle by the Board nor was there compliance with the obligations to inform and record in the 2005 Regulations [40]. As a result, the prohibition on having tobacco products and the related powers to search and confiscate are illegal and fall to be annulled [41]. Article 8 Mr McCanns Article 8 right to privacy has been infringed [43]. The smoking ban is within the ambit of Article 8 [57]. Where therapeutic detention has severely curtailed a detained patients private space, there is a need to protect this residual autonomy by requiring further intrusion into his private life to be justified [55]. The decision is not in accordance with law as the Board failed to address the requirements of section 1(4) of the 2003 Act and the 2005 Regulations in relation to the part of the ban relating to the prohibition of possession, searches and confiscation of tobacco products [58]. But for this illegality, the decision would not have been contrary to Article 8 [62]. The smoking ban pursued the legitimate aim of the protection of public health and was rationally connected to that aim [59]. Faced with the difficulties of implementing a partial ban, the Board did not act disproportionately in imposing the comprehensive smoking ban when it did [60]. Article 14 The Article 14 challenge fails. The differences in treatment between detained patients in the State Hospital and patients in other NHS facilities or prisoners are a matter of timing rather than policy as the Scottish Government has committed to extending the ban. The earlier implementation of the comprehensive smoking ban in the State Hospital is due to the difficulties faced by the State Hospital in operating the partial ban. It is therefore unnecessary to consider the differences between the circumstances of Mr McCann and those of the other groups [64]. Further, there is no unjustified discrimination when detained patients are compared with the general public at liberty as the circumstances of members of the public are radically different [65].