This is a challenge by application for judicial review to the legality of the comprehensive ban on smoking at the State Hospital at Carstairs which the State Hospitals Board for Scotland (the Board) adopted by a decision taken at a meeting on 25 August 2011 and implemented on 5 December 2011. The appellant, Mr McCann, does not challenge the ban on smoking indoors. His challenge relates only to the ban on smoking in the grounds of the State Hospital and on home visits, which, by creating a comprehensive ban, prevents detained patients from smoking anywhere. Mr McCann suffers from a mental disorder. After committing a number of offences which were prosecuted on summary complaint, he was detained without limit of time in the State Hospital under orders made originally under the Criminal Procedure (Scotland) Act 1975 (and more recently under the Criminal Procedure (Scotland) Act 1995 (the 1995 Act)) in December 1995. He remained in detention in the State Hospital until March 2014. He was then transferred to a medium secure unit in Glasgow, called the Rowanbank Clinic, where he remains in the care of NHS Greater Glasgow (NHSGG). NHSGG has decided to introduce a comprehensive smoking ban at the Rowanbank Clinic. Mr McCann has challenged that decision in separate proceedings for judicial review but his application remains sisted (stayed), pending the outcome of this appeal. Mr McCann raises three principal issues in his challenge. First, he argues that the impugned decision is invalid at common law on the ground of ultra vires because, when so deciding, it did not adhere to the principles laid down in section 1 of the Mental Health (Care and Treatment) (Scotland) Act 2003 (the 2003 Act) (which I set out in para 22 below) or comply with the requirements of subordinate legislation made under the 2003 Act. Secondly, he submits that the impugned decision was unlawful because it unjustifiably interfered with his private life and thereby infringed his right to respect for his private life under article 8 of the European Convention on Human Rights and Fundamental Freedoms (ECHR). Thirdly, founding on article 14 of ECHR in combination with article 8, he argues that the Board, by implementing the comprehensive smoking ban, has treated him in a discriminatory manner which cannot be objectively justified when compared with (i) people detained in prison, (ii) patients in other hospitals (whether detained or not) or (iii) members of the public who remain at liberty. After setting out the factual background and the relevant legislation and summarising the proceedings in the courts below, I will address each challenge in turn. The factual background For many years public authorities in Scotland and elsewhere in the United Kingdom have sought to discourage smoking because of concerns about its effects on the health of the smokers and of those exposed to second hand smoke, by so called passive smoking. Section 4 of the Smoking, Health and Social Care (Scotland) Act 2005 empowered the Scottish Ministers to make regulations prescribing classes of premises in which smoking would be prohibited and also the premises to be excluded from that ban. Among the premises which the Prohibition of Smoking in Certain Premises (Scotland) Regulations 2006 (SSI 2006/90) prescribed as no smoking premises were hospitals, hospices, psychiatric hospitals, psychiatric units and healthcare premises. Open areas, such as hospital grounds, were not so specified. Among the premises exempted from the smoking ban were designated rooms in psychiatric hospitals and psychiatric units. Over time, public authorities have sought to extend the smoking ban. Between 2007 and 2011 the buildings at the State Hospital were redeveloped and modernised. The business case for the redevelopment, which the Scottish Government approved, proposed that the State Hospital would be a smoke free environment and that there would be no provision for smoking either indoors or in the gardens and grounds. In accordance with that policy, the new buildings contain no indoor smoking rooms or facilities which would allow patients to take advantage of the exemption in the Regulations. The Board then had to consider whether, and if so for how long, it would continue to allow smoking in the grounds of the State Hospital. The process by which the Board came to take the impugned decision is set out in a document published by NHS Scotland in February 2012 called Working towards a smoke free environment: an account of the journey undertaken at the State Hospital. Mr McCann founded on this document in his written pleadings (statement 5) as the factual background to the impugned decision. In summary, on 28 October 2010 the Board considered a report by its medical director and resolved to work towards a comprehensive smoking ban with effect from May 2011. After the judgment of the Court of Session in L v Board of State Hospital 2011 SLT 233, in which Lady Dorrian held that the Board had failed to consult with patients (as it had conceded it was required to do by section 1 of the 2003 Act) on its decision to ban visitors from bringing food parcels into the State Hospital and to ban patients from ordering in food, the Board reconsidered its policy concerning smoking at a meeting on 17 February 2011. It agreed to allow smoking to continue in the existing smoking rooms and to conduct a consultation on the options of a partial or comprehensive smoking ban. The Board conducted the consultation between 1 March and 31 May 2011. It presented two options: a partial ban which permitted smoking only in designated open air areas within the grounds or a complete ban both internally and within the grounds. 86% of the patients who responded favoured the partial ban. The Board met again on 23 June to consider a report on the consultation which recommended that smoking be permitted in designated external areas in the grounds. The Board accepted that proposal subject to further consideration of how the partial ban would work in practice. The Board also confirmed its commitment to working towards a smoke free hospital. At a further meeting on 5 July 2011 the Board confirmed that position. Because the patients were soon to move to the new building, the Board decided to close the smoking rooms in the existing buildings and to prohibit smoking in the ward gardens as from 1 August 2011, leaving only the designated external areas for smoking. The Board agreed to review its decision in November 2011. The Board conducted a further consultation in mid August 2011 in which it asked for responses to the same options of a partial ban or a comprehensive ban. 64% of patients favoured a partial ban and 36% a comprehensive ban. The Boards chief executive prepared a report on the operation of the partial ban which the Board considered at a meeting on 25 August 2011. At that meeting the Board made the impugned decision to implement a comprehensive smoking ban in December 2011. The patients moved into the new buildings on 21 September 2011. On 5 December 2011 the comprehensive smoking ban came into force. In his petition for judicial review Mr McCann initially called for the Board to produce the minute of the meeting of 25 August 2011 in order to disclose the reasons for the impugned decision. After the minute was produced, he founded on it to challenge the impugned decision for its failure to apply the principles set out in section 1 of the 2003 Act. The minute of the meeting of the Board on 25 August 2011 recorded the reasons for the decision in these terms: [The Boards Chief Executive] outlined the activity following the Boards decision and the considerable problems experienced in operationalising the process, eg increasing numbers of higher risk patients had been referred for consideration of grounds access. The Senior Team had discussed a draft operational policy at their meeting on 27 July 2011 and agreed that from a practical point of view, patients would be permitted to smoke in existing ward gardens at eight set points during each day. The clinical team would agree the set points during each day. Members were asked to consider: (i) The feedback received over the first month of the restrictions on the appendix received (ii) To allow smoking to continue in the grounds, with further limitations, until 30 November 2011 (iii) A full non smoking environment as of 1 December 2011 Members noted that the decision taken in June 2011 was to be reviewed in November 2011. The documented feedback which had been received over the course of August 2011 from staff, as well as smoking and non smoking patients was reviewed. The discussion that followed centred around the difficulties encountered with the partial cessation of smoking at the Hospital in relation to issues of safety and security, operational and clinical disruption, time demands on staff, fairness of the partial restrictions, and the inconsistencies around the set points in the day when smoking was permitted. In light of the difficulties discussed and the importance of the operational managements view, Members agreed that the partial cessation of smoking at the Hospital had proved to be unworkable despite the best efforts of staff involved. It was agreed that the State Hospital would be a full non smoking environment as of 1 December 2011. Support to patients in their smoking cessation attempts would continue and be accelerated. The document, Working towards a smoke free environment , to which I referred in para 7 above contains more details of the problems that became apparent in August and September 2011. Patients tended to power smoke in the few opportunities they had to smoke and some reverted back to previous institutionalised behaviour such as clock watching. Staff who attended them complained about daily exposure to passive smoking. The document also spoke of significant operational and security risks. After the move to the new buildings, concerns were expressed about patients congregating outside in breach of grounds access rules. The impugned decision had several elements. It prohibited a detained patient from smoking or possessing tobacco products in the State Hospital, including in its grounds, and from smoking on home visits. It also prohibited visitors from bringing tobacco products and tobacco related products (such as electronic cigarettes or lighters) into the hospital. Search and screening procedures were established to search both patients and visitors for such products. Tobacco products which the patients possessed on 1 December 2011 had to be posted to an external address. The impugned decision was taken against the backdrop of a developing policy of the Scottish Government to control the use of tobacco and to prevent smoking at NHS facilities. The Scottish Ministers have continued to pursue that policy. In March 2013 they published a document entitled Creating a Tobacco free Generation: A Tobacco Control Strategy for Scotland. In that publication Ministers proposed (pp 26 27) (a) that mental health services should make sure that indoor facilities were smoke free by 2015 and (b) that all NHS Boards would implement and enforce smoke free hospital grounds by March 2015, by removing any designated smoking areas in NHS buildings or grounds. Ministers excluded mental health facilities from the latter policy. But since then some health boards have extended the comprehensive ban to such facilities. The relevant legislation (i) National Health Service (Scotland) Act 1978 Under section 102(1) of the National Health Service (Scotland) Act 1978, the Scottish Ministers are charged with the duty of providing such hospitals as appear to [them] to be necessary for persons subject to detention under the 1995 Act or the 2003 Act, which hospitals are described in subsection (2) as state hospitals. Under subsection (4) the Scottish Ministers are empowered to provide for the management of a state hospital to be undertaken on their behalf by among others a special health board. Under that provision the Board acts as the delegate of the Scottish Ministers in managing the State Hospital. The Board contends that, in deciding upon and implementing the comprehensive smoking ban and measures to enforce that ban, it has acted solely under its power of management in this section. (ii) Mental Health (Care and Treatment) (Scotland) Act 2003 Until the enactment of the 2003 Act, the care and treatment of mental health patients were governed by the Mental Health (Scotland) Act 1984. Over time, concerns emerged that the legislation did not adequately protect the rights of patients who were subjected to compulsory detention. One of the factors which led to these concerns was the increased emphasis on personal autonomy which resulted from the influence of the ECHR and the incorporation of the ECHR in our domestic law, first by the Scotland Act 1998 and then by the Human Rights Act 1998. In 1999 the Scottish Ministers commissioned a review of mental health legislation by a committee under the chairmanship of the Rt Hon Bruce Millan, who had formerly been the Secretary of State for Scotland. In January 2001 the Scottish Ministers laid the report, New Directions: Report on the review of the Mental Health (Scotland) Act 1984, before the Scottish Parliament. The report sought to promote greater awareness of the need to respect human rights and the adoption of the least restrictive alternative in the compulsion of mental health patients. It also sought to make sure that any compulsory intervention was tailored to the particular needs and circumstances of the individual (Introduction, paras 1 and 4). It recommended that a new Act should be based on principles which were stated on the face of the Act itself (Introduction, para 2; Chapter 3). This gave rise to section 1 of the 2003 Act, which I set out in para 22 below. In chapter 11 of the report the committee addressed, among other things, the searching of patients, an issue which lies at the heart of the first ground on this appeal. It observed that the 1984 Act contained no specific framework for searches. The report (para 44) referred to the judgment of Potts J in R v Broadmoor Hospital Authority, Ex p S The Times, 5 November 1997, in which he held that a general power to conduct random searches must necessarily be implied as part of the Broadmoor Hospital Authoritys duty to create and maintain a safe and therapeutic environment. The committee recommended that a Code of Practice should set out the parameters of search policies as it was important that the rights of patients were clear in relation to this (para 46). The Scottish Executive did not accept all of the recommendations of the Millan Committee. In its White Paper, Renewing Mental Health Law Policy Statement, the Executive accepted the committees recommendation as the framework for a future Bill while modifying some of its recommendations in relation to offenders with mental disorders. It accepted both the inclusion of a statement of principles (p 5) and a Code of Practice to give guidance on the operation of the new statutory powers, including the regulation of searches (p 69). The 2003 Act includes in section 1 a statement of principles for the discharge of functions under the Act; and it also contains in section 286 a provision for the making of regulations for safety and security in hospitals, including the searching of detained patients and the placing of restrictions on what detained persons and visitors may have with them. The Policy Memorandum to the Bill in discussing the relevant clause which became section 286 stated: 255. The Bill makes provision to regulate any interference by hospitals of certain civil rights of detained patients, including withholding correspondence, monitoring or restricting other forms of communication, searching patients or their belongings, and restricting access to visitors. 259. The Bill also sets up a framework for regulations authorising measures in connection with the use of telephones, searches, surveillance and restrictions on patients or visitors. The intention is that hospitals be required to develop policies setting out how any such security measures will be applied, recorded and monitored, and that the Executive and the Mental Welfare Commission will monitor the terms of these policies and their operation. (1) Subsections (2) to (4) below apply whenever a person is discharging a function by virtue of this Act in relation to a patient who has attained the age of 18 years. (2) In discharging the function the person shall, subject to subsection (9) below, have regard to the matters mentioned in subsection (3) below in so far as they are relevant to the function being discharged. (3) The matters referred to in subsection (2) above are Section 1 of the 2003 Act, which is headed Principles for discharging certain functions, provides, so far as relevant: (a) the present and past wishes and feelings of the patient which are relevant to the discharge of the function; (b) the views of (i) the patients named person; (ii) any carer of the patient; (iii) any guardian of the patient; and (iv) any welfare attorney of the patient, which are relevant to the discharge of the function; (c) the importance of the patient participating as fully as possible in the discharge of the function; the importance of providing such information (d) and support to the patient as is necessary to enable the patient to participate in accordance with paragraph (c) above; (e) case; (f) benefit to the patient; the need to ensure that, unless it can be shown (g) that it is justified in the circumstances, the patient is not treated in a way that is less favourable than the way in which a person who is not a patient might be treated in a comparable situation; the importance of providing the maximum the range of options available in the patients (h) the patients abilities, background and characteristics, including, without prejudice to that generality, the patients age, sex, sexual orientation, religious persuasion, racial origin, cultural and linguistic background and membership of any ethnic group. (4) After having regard to the matters mentioned in subsection (3) above; such other matters as are relevant in the (a) and (c) circumstances, the person shall discharge the function in the manner that appears to the person to be the manner that involves the minimum restriction on the freedom of the patient that is necessary in the circumstances. (9) The person need not have regard to the views of a person mentioned in subsection (3)(b) above in so far as it is unreasonable or impracticable to do so. Unsurprisingly, the 2003 Act does not define the functions which a person discharges by virtue of the Act. But I would interpret subsection (1) as meaning that a person discharges such a function when he or she exercises a power conferred by the 2003 Act or by subordinate legislation made under the Act. Section 286 of the 2003 Act, which is headed Safety and security in hospitals, provides, so far as relevant: (1) Regulations may authorise (a) the search of such persons detained in hospital by virtue of this Act or the 1995 Act as may be specified in the regulations and of anything they have with them in the hospital in which they are detained; (c) the placing of restrictions on the kinds of things which those persons may have with them in the hospitals in which they are detained and the removal from them of articles kept in breach of such restrictions; (d) the placing of prohibitions and restrictions on the entry into and the conduct while in those hospitals of persons (visitors) visiting those persons or otherwise entering or seeking to enter those hospitals and on the kinds of things which visitors may bring with them into those hospitals; (f) with them into those hospitals, the search of visitors and of anything they bring and make that which is authorised subject to conditions specified in the regulations. The Scottish Ministers prepared regulations to give effect to section 286, which the Scottish Parliament approved by affirmative resolution: the Mental Health (Safety and Security) (Scotland) Regulations 2005 (SSI 2005/464) (the 2005 Regulations). In their consultation on the draft regulations in 2004 the Scottish Ministers explained (paras 54 55) that hospitals had policies prohibiting certain articles and substances being brought into or retained in hospital and on searching patients and visitors. The Ministers stated (para 56): [t]he aim of these regulations is to put these policies on a firm legislative footing, to ensure that there is proper recording and monitoring of decisions to use powers to search patients or visitors and to prevent certain substances and articles being brought into hospitals. The 2005 Regulations (regulation 4) authorise measures such as the placing of restrictions on the kind of things that specified persons may have with them in hospitals and the removal from them of articles kept in breach of those restrictions. Regulation 4 authorises similar restrictions on visitors, and the search of both specified persons and visitors. Regulation 2 provides that a person detained in, among others, the State Hospital and the Rowanbank Clinic is a specified person if the hospital managers have (a) informed the patient and his or her named person and the Mental Welfare Commission for Scotland that he or she is a specified person and (b) informed the patient and his or her named person that he or she is subject to the regulation 4 measures and also that the specified person has a right of re assessment under regulation 5(b). Consistently with the philosophy of the least restrictive alternative, regulation 5 sets out general conditions for the measures. Condition (a) is that measures may only be applied to a specified person if the persons responsible medical officer (RMO) is of the opinion that not to apply them would pose a significant risk to the health, safety or welfare of any person in the hospital or the security or good order of the hospital. Condition (b) requires the RMO to re assess the risk mentioned in condition (a) at the specified persons request and empowers the RMO to reverse the decision to apply the measure. Condition (c) requires that the reasons for and outcome of applying a measure shall be recorded in the specified persons medical records and that the hospital managers make a separate record; and condition (d) requires, as a general rule, that the named person shall be given notice of the entry in the medical records. Regulations 6 and 10 set out specific conditions for the searching of specified persons and visitors. Regulation 8, which again is consistent with the philosophy of the least restrictive alternative, imposes a condition that restrictions shall be placed on having any article so as to minimise the impact on the freedom of the specified person compatible with the general condition in regulation 5(a) (ie condition (a) above). Section 274 of the 2003 Act requires the Scottish Ministers to publish a code of practice giving guidance to any person discharging functions by virtue of the Act. Subsection (4) requires any person discharging functions by virtue of the 2003 Act to have regard (so far as they are applicable to the discharge of those functions by that person) to the provisions of any code of practice published under subsection (1) above for the time being in force. Chapter 12 of the Code of Practice, which the Scottish Ministers published under section 274 of the 2003 Act, gave guidance on procedures for restrictions on patients correspondence and use of telephones and also for measures to ensure the safety and security of hospitals, staff, patients and visitors. It advised that the restrictions and measures must be applied in a way which respects patients rights and dignity and is commensurate with any perceived risk to the health, safety or welfare of the patient or any other person. Para 50 of that chapter repeated the requirement of regulation 8 of the 2005 Regulations (above) to minimise the impact of the restriction on the patient. As I discuss below, in relation to the application of the 2003 Act, central questions in this part of the appeal include (a) whether the Board, in imposing the comprehensive smoking ban, was exercising a function under the 2003 Act so as to bring into play the section 1 principles and (b) whether the prohibition of possession of tobacco products and the power of search and confiscation, which were components of the impugned decision, fall within the 2005 Regulations or are excluded on the basis that they do not relate to safety and security. The legal proceedings Mr McCann raised judicial review proceedings in which he sought the reduction (annulment) of the decision, a declarator of the breach of his Convention rights and also damages as just satisfaction. As I have stated in para 7 above, he founded on the document, Working towards a smoke free environment in pleading the factual background to the impugned decision. He initially complained about the Boards failure to disclose the minute which recorded the decision, but, having received the minute in the course of the proceedings, founded on it to amend his written pleadings in order to plead a case (statement 15 of his petition) that the Board had failed to take account of relevant factors, and in particular to apply the principles set out in section 1 of the 2003 Act (the 2003 Act principles). At the First Hearing the Lord Ordinary, Lord Stewart, heard oral submissions on both the facts and the law. Counsel presented their cases by referring to the documents for the factual background. No affidavits were produced, no oral evidence was led and accordingly no challenge was made to the contents of the documents in cross examination. As Mr McCann based his challenge on those documents, the absence of other evidence is not surprising. The parties should have complied with good practice by entering into a joint minute agreeing the documents and dispensing with probation; but that was implicitly what they did. The Lord Ordinary in his opinion narrated the events which the documents disclosed and which gave rise to the impugned decision. In his interlocutor dated 27 August 2013 the Lord Ordinary declared that the impugned decision was unlawful so far as it affected Mr McCann both because it was not taken in accordance with the 2003 Act principles and also because it breached his Convention rights under articles 8 and 14 of the ECHR. The Lord Ordinary did not award damages but ruled that the finding of the breach of those articles was just satisfaction in terms of article 41 of the ECHR. The Board appealed that decision by a reclaiming motion which was heard by the Second Division of the Inner House (the Lord Justice Clerk (Lord Carloway), Lady Paton and Lord Brodie). The Board submitted that the 2003 Act principles did not apply to the impugned decision, that Mr McCanns article 8 right to respect for his private life was not engaged, or, if it was, the impugned decision was a proportionate one which did not infringe his article 8 right. The Lord Justice Clerk gave the leading opinion, with which Lord Brodie agreed, in which he allowed the appeal and refused the prayer of the petition. He held that the Board was exercising its powers of management under the 1978 Act when it made the impugned decision. The 2003 Act was concerned with the care and treatment of the individual patient and the impugned decision did not involve the discharge of a function under that Act. Accordingly, the 2003 Act principles had no application to the decision. In relation to the article 8 challenge, the Lord Justice Clerk referred to the decision of the Strasbourg court (the ECtHR) in Munjaz v United Kingdom [2012] MHLR 351; [2012] ECHR 1704, which (a) emphasised the principle of personal autonomy in article 8, (b) ruled that detained persons were presumed to enjoy all the fundamental rights and freedoms guaranteed by the ECHR, except the right to liberty, where the detention was lawfully imposed in accordance with article 5 of the ECHR and (c) required any restriction of those rights to be justified in each individual case. He sought to apply those principles in this case. In agreement with the Divisional Court and the majority of the Court of Appeal of England and Wales in the case concerning the statutory ban on smoking at Rampton Hospital, R (N) v Secretary of State for Health [2008] HRLR 42 and [2009] HRLR 31 (also reported as R (G) v Nottingham Healthcare NHS Trust [2009] PTSR 218 and [2010] PTSR 674) (the Rampton Hospital case), he held that a comprehensive smoking ban on persons detained in an institution did not have a sufficiently adverse effect on a detainees integrity and autonomy as to merit protection under article 8. He ruled (para 93) that the comprehensive smoking ban did not engage article 8. If article 8 were engaged, he held that the impugned decision was justified under article 8(2) as the comprehensive ban was proportionate to the legitimate aim of promoting the health of both the detained patients and staff. On the same hypothesis, he rejected the article 14 challenge (a) as prisons could not be compared with the therapeutic environment of the State Hospital and (b) as the Scottish Government was proposing to introduce a comprehensive prohibition against smoking in all hospitals in the relatively short term. Lady Paton agreed with the opinion of the Lord Justice Clerk except in one respect. She opined that article 8 was engaged. She drew support from Keene LJs dissenting judgment in the Rampton Hospital case and expressed the view that smoking was an addictive activity which was very much part of an individuals personal autonomy. But she agreed that the impugned decision was justified under article 8(2) and that there had been no discrimination under article 14. Discussion of the challenges the 2003 Act i) The impugned decision involves not only a comprehensive ban on smoking, which extends to smoking in the grounds of the State Hospital and on visits to a detained persons home, but also a policy of searching both detained patients and visitors for and confiscating tobacco. While the power to search for and confiscate tobacco is a necessary component of the decision as it is the means by which the comprehensive ban can be enforced, I am not persuaded that the comprehensive ban itself falls within the scope of the 2003 Act. In my view the Board is correct in its submission that the comprehensive ban, viewed on its own, involves the exercise of a power of management under the 1978 Act. But, for the reasons which I set out below, I have come to the view that the supporting prohibition on 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. First, I do not accept the submission that the 2003 Act is concerned only with the treatment of individual patients and that it does not impinge on more general management policies. That Act, which replaced the 1984 Act, provides, among other things, for the detention of and the giving of care and treatment to mental health patients. Many sections of the 2003 Act relate to the making of such provision to the individual patient. But the discharge of functions under the 2003 Act is not confined to individual care and treatment. In Part 18 of the Act (which is headed Miscellaneous) there are a series of sections (sections 281 286) which provide either directly or through regulations for the withholding of correspondence and the regulation of the use of telephones, as well as for the functions with which this appeal is concerned, namely the placing of restrictions on the kinds of things which specified persons may have in a hospital, searches and confiscation. The regulations made in support of those provisions, namely the 2005 Regulations to which I have referred in paras 24 and 25 above and also the Mental Health (Definition of Specified Person: Correspondence) (Scotland) Regulations 2005 (SSI 2005/466) and the Mental Health (Use of Telephones) (Scotland) Regulations 2005 (SSI 2005/468), are subject to conditions (a) as a general rule that the detained patient, his or her named person and the Mental Welfare Commission for Scotland are informed that he or she is a specified person and (b) that the detained person is informed of the restriction. Thus interested parties must be informed of measures which affect individual patients, whether as a result of general management policies or of individual targeting of patients. The relevant regulations also require records to be kept of any decisions to search a specified person and to prohibit or restrict the use of telephones by such a person. While the further requirement in the 2005 Regulations (regulation 5(c)) to record a measure in an individual patients medical records may seem unnecessary where a measure is of general application, that is not, in my view, a sufficient indication of an intention to confine section 286 and the 2005 Regulations to individually targeted measures. The requirements in each of the sets of regulations mentioned in para 35 above are consistent with the policy underlying section 286 of the 2003 Act that the Scottish Government and the Mental Welfare Commission should monitor the terms of policies for such measures and their operation: para 21 above. I can see no rationale for excluding measures of general application from this supervision, nor did counsel suggest any. I recognise that some of the matters mentioned in section 1(3) of the 2003 Act are not relevant to the discharge of these functions, especially when the measures are not targeted at individual detained patients; but section 1(2) and (9) provide for that. Secondly, the 2005 Regulations do not set limits on the things, the possession of which may be prohibited or restricted, and for which specified persons or visitors may be searched. Both the heading of section 286 of the 2003 Act and the title of the 2005 Regulations refer to safety and security, but there is no provision in either the section or the 2005 Regulations which confines the things to items such as weapons which might threaten the safety of others. Section 286 also provides for the taking of samples from persons, including swabs and blood (subsection (1)(b)) and the surveillance of specified persons or visitors (subsection (1)(e)). Thirdly, the focus of the section and the regulations made under it is on the regulation of activities which impinge on the autonomy of individuals. That focus on the detained patients autonomy is consistent with the Millan reports emphasis on the need to respect human rights. It manifests itself in greater transparency by legislative provision for such policies, and through the informing of interested parties of the regulated measures, the maintenance of records of such measures, and the supervision by the Scottish government and the Mental Welfare Commission. The devising of policies and the carrying out of such measures have thus become functions under the 2003 Act. The principles in section 1 of that Act apply to such measures in so far as they are relevant. One principle which is clearly relevant is the obligation in section 1(4) to discharge the function in the manner that involves the minimum restriction on the freedom of the patient that is necessary in the circumstances an obligation to which the Code of Practice draws attention. The Board did not purport to act under the 2003 Act in instituting the policy of prohibiting the possession of tobacco products, searching for such products and confiscating them. It may be the case that the consultation exercises which the Board carried out during 2011 were sufficient to comply with the obligations in section 1(2) and (3) of the 2003 Act. But there appears to have been no consideration of the obligation under section 1(4) nor compliance with the obligations to inform and record in the 2005 Regulations. This is not surprising as the Board considered that it was acting under the 1978 Act. As a result, the prohibition on having tobacco products and the related powers to search and confiscate are in my view illegal and fall to be annulled. Although Mr McCanns counsel argued that the component parts of the impugned decision were not severable and counsel for the Board made no submissions to the contrary, I would prefer to invite submissions on the form of order which this court should make before making such an order. ii) Article 8 of the ECHR As is well known, article 8 of the ECHR protects the right to respect for private and family life and provides: 1. Everyone has the right to respect for his private and family life, his home and his correspondence. 2. There shall be no interference by a public authority with the exercise of this right except such as is in accordance with the law and is necessary in a democratic society in the interests of national security, public safety or the economic well being of the country, for the prevention of disorder or crime, for the protection of health or morals, or for the protection of the rights and freedoms of others. In my view, the prohibition against having tobacco products, and the power to search patients in and visitors to the State Hospital for such products and confiscate them, infringe Mr McCanns right under article 8 of the ECHR because I consider (a) for the reasons discussed below, that they interfere with his article 8 right, and (b) for the reasons discussed above, that they do not comply with the 2003 Act and thus cannot meet the requirement of article 8(2) that they are in accordance with the law. As it is likely that the problem of compliance with the 2003 Act is remediable, I set out why, contrary to the view of the majority of the Second Division, I have concluded that the comprehensive ban itself amounts to such interference, which has therefore to be justified. I also set out my view as to why, but for the problem of the domestic legal basis of part of the decision (which I have discussed above), I consider that the impugned decision (comprising both the comprehensive ban on smoking and the supportive measures of the prohibition of possession and powers of search and confiscation) would have been a proportionate response to the legitimate aim of the protection of health, which is recognised in article 8(2), through its promotion and safeguarding of the health of both patients and staff at the State Hospital. The scope of article 8: I adopt as a general statement Lord Binghams description of the purpose of article 8: It is to protect the individual against intrusion by agents of the state, unless for good reason, into the private sphere within which individuals expect to be left alone to conduct their personal affairs and live their personal lives as they choose: R (Countryside Alliance) v Attorney General [2008] AC 719, para 10 (Countryside Alliance). But it is notoriously difficult and may be impossible to determine the boundaries of the personal sphere and thus of the article 8 right to respect for private life. The ECtHR has identified values which the article protects but has rejected the possibility or necessity of attempting an exhaustive definition of the notion of private life: Niemietz v Germany (1992) 16 EHRR 97, para 29. Judicial formulations of the values are inevitably influenced by the facts of the particular case and, in particular, by the nature of the states intervention or failure to intervene in the life of the claimant. The House of Lords, when examining the boundaries of such values in Countryside Alliance in the context of the hunting ban, expressed differing and inconsistent views. The concept encompasses securing a sphere within which an individual can freely pursue the development and fulfilment of his personality and to a certain degree the right to establish and develop relationships with other people: Brggemann and Scheuten v Federal Republic of Germany (1977) 3 EHRR 244 (the Human Rights Commission) paras 55 57. More recently, emphasis has been placed on personal autonomy. Thus in Pretty v United Kingdom (2002) 35 EHRR 1, which concerned the statutory ban on assisted suicide, the ECtHR summarised its jurisprudence (para 61): [T]he concept of private life is a broad term not susceptible to exhaustive definition. It covers the physical and psychological integrity of a person. It can sometimes embrace aspects of an individuals physical and social identity. Elements such as, for example, gender identification, name and sexual orientation and sexual life fall within the personal sphere protected by article 8. Article 8 also protects a right to personal development, and the right to establish and develop relationships with other human beings and the outside world. Though no previous case has established as such any right to self determination as being contained in article 8 of the Convention, the Court considers that the notion of personal autonomy is an important principle underlying the interpretation of its guarantees. The ECtHR recognised that a persons autonomy could extend to the pursuit of activities which caused him or her harm. In para 62 it stated: The court would observe that the ability to conduct ones life in a manner of ones own choosing may also include the opportunity to pursue activities perceived to be of a physically or morally harmful or dangerous nature for the individual concerned. The idea of personal autonomy can also be seen in von Hannover v Germany (2004) 40 EHRR 1, para 50 (in the context of press intrusion into private life) and Munjaz v United Kingdom (above), para 78 (in the context of solitary confinement). Also relevant to this appeal is the protection which article 8 gives to the home as Mr McCann submits that as a result of his long term detention the State Hospital had become his home. In article 8 home is an autonomous concept. In Giacomelli v Italy (2007) 45 EHRR 38 (a case concerning environmental pollution) the ECtHR stated that a home will usually be the place, the physically defined area, where private and family life develops. It continued: The individual has a right to respect for his home, meaning not just the right to the actual physical area, but also to the quiet enjoyment of that area (para 76). Similarly, in Harrow London Borough Council v Qazi [2004] 1 AC 983 Lord Hope cited the opinion of Sir Gerald Fitzmaurice on the scope of article 8 in Marckx v Belgium (1979) 2 EHRR 330 and stated (para 50): The emphasis is on the persons home as a place where he is entitled to be free from arbitrary interference by the public authorities. This court is not bound by the judgments of the ECtHR; section 2 of the Human Rights Act 1998 requires us to do no more than to take account of such decisions. But in Countryside Alliance (above) the majority of the speeches in the House of Lords appear to have accepted the relevance of the concept of personal autonomy at least in certain contexts: Lord Bingham (para 10), Lord Hope (para 54), and Lord Brown (paras 138 139). The concept is also consistent with Lady Hales identification of one of the values reflected in article 8, being the inviolability of the personal and psychological space within which each individual develops his or her own sense of self and relationships with other people (para 116). She continued in the same paragraph by stating that article 8 protected that private space but opined that that falls some way short of protecting everything they might want to do even in that private space. Lord Brown (para 139) expressed the wish that jurisprudence would extend to encompass a broad philosophy of live and let live, allowing people to engage in whatever pursuits they wish that were central to their well being unless there was a good and sufficient reason to forbid them. But he also recognised that article 8 had not been interpreted as going that far. So how should one apply article 8 to a detained patient in the State Hospital? Does a detained patient such as Mr McCann have a private space, in which his wish to smoke is protected? The majority of the Second Division held he did not and reasoned as follows (paras 89 93). First, they said that a detainees right to respect for private life extended only to protection against interference beyond the concomitants of lawful detention. They then considered that institutions such as the State Hospital would be unmanageable without some restriction of the scope of the right to respect for private life of detained persons to that beyond the ordinary restrictions pursuant to lawful detention. Thirdly, they agreed with the majority of the Court of Appeal in the Rampton Hospital case (para 32 above) that a comprehensive smoking ban in such an institution did not have a sufficiently adverse effect on a persons physical or psychological integrity or his right to personal development as to merit protection. I respectfully disagree with the third stage of that analysis. Lawful deprivation of liberty involving long term detention in an institution inevitably curtails a detainees private sphere and constraints which are a necessary part of the detention would not fall within the ambit of article 8. But it seems to me that the degree of constraint which lawful detention imposes on the detained patients private sphere works in the opposite direction from the third stage of that analysis because it requires the court assiduously to uphold the right to respect for what little remains of that sphere. My starting point is the recognition in our domestic law that a person who is compulsorily detained by the state enjoys all the civil rights which are not taken away expressly or by implication as a result of that detention. The House of Lords so held in the English case of Raymond v Honey [1983] 1 AC 1, 10 per Lord Wilberforce, and both Lord Glennie and the First Division of the Inner House have affirmed the same principle in Scots law: Potter v Scottish Prison Service 2007 SLT 1019, para 25. The Grand Chamber of the ECtHR has taken a similar approach in relation to fundamental rights in Hirst v United Kingdom (No 2) (2006) 42 EHRR 41, in which it stated (para 69): prisoners in general continue to enjoy all the fundamental rights and freedoms guaranteed under the Convention save for the right to liberty, where lawfully imposed detention expressly falls within the scope of article 5 of the Convention. See also Munjaz v United Kingdom (above) para 79, in which the Fourth Section repeated this analysis and added: Any restriction on those rights must be justified in each individual case. The detained patients ability to conduct his or her life as he or she chooses is inevitably severely curtailed by compulsory detention in the State Hospital. For sound therapeutic reasons, many things which are available to a person at liberty in his or her private home cannot be made available to a detained patient. The circumstances of therapeutic detention may require the control of things which the detained patient may possess, including things that might be used as weapons against others or to self harm; the possession and consumption of alcohol may be prohibited; and many social activities, such as eating meals in the company of other patients, may have to be conducted only under close supervision. Routine and random searches may be an incident of therapeutic detention and treatment: the Court of Appeal treated them as such in R v Broadmoor Hospital Authority, Ex p S [1998] COD 199. In these ways and others, the loss of liberty entailed in therapeutic detention restricts the scope of the private sphere and therefore the protections available under article 8, as the Second Division held. Further, I agree with Lady Hale (in Countryside Alliance para 116) that article 8 does not protect everything that people may want to do in their private space. But where therapeutic detention has severely curtailed a detained patients private space in the institution in which he or she must reside, the limited areas in which a patient has freedom of choice become all the more precious to him or her and more readily form a core part of his or her life, as Lord Rodger used the phrase in Countryside Alliance (paras 95 106). In L v Board of State Hospital (above) Lady Dorrian stated (para 26) that for people detained in the State Hospital the freedom to receive food parcels from visitors and to make purchases from an external source are some of the few areas in which they may exercise some sort of personal autonomy or choice. She concluded that article 8 was engaged by an interference with that choice and that such interference had to be justified. Because restrictions on food parcels and external purchases of food are not inherent in the loss of liberty occasioned by therapeutic detention, I agree; and I see an analogy in the comprehensive smoking ban. It is not necessary to decide whether a comprehensive ban on smoking by people at liberty, or at least a ban outside their homes, would so interfere with their private lives as to require justification under article 8. Such people can exercise personal autonomy in many other ways. But there is a need to protect the residual autonomy of a person who has been subjected to long term therapeutic detention by requiring this further intrusion into his private life to be justified. In this regard I agree with Keene LJ in his dissenting judgment in the Rampton Hospital case (para 101) and Lady Paton in this case (para 106). I do not consider the addictive nature of smoking, which Lady Paton emphasises, is a decisive factor, not least because it militates against the persons autonomy. But it may be said to reinforce the role that smoking can play in some peoples lives. I also do not find it necessary to decide whether the State Hospital falls to be treated as Mr McCanns home for the purposes of article 8. If it were, my analysis would essentially be the same as the one which I have adopted based on the concept of personal autonomy. I therefore conclude that a comprehensive ban on smoking is within the ambit of article 8 of the ECHR, that it interferes with Mr McCanns right to respect for his private life and therefore that the Board must justify it. Justification: As is well known, justification under article 8(2) requires that the measure which interferes with the right (i) is in accordance with the law, (ii) pursues a legitimate objective, (iii) is rationally connected to the legitimate objective and (iv) is proportionate. I have already discussed the requirement that the interference be in accordance with the law and have concluded that the part of the impugned decision relating to the prohibition of possession, searches for and confiscation of tobacco products, did not meet that requirement because of the failure of the Board to address the requirements of section 1(4), and the regulations made under section 286, of the 2003 Act. But because the Board may seek to introduce such measures in accordance with the 2003 Act, I address the other tests. I address first the tests of legitimate objective and rational connection. In the Rampton Hospital case both the Divisional Court and the Court of Appeal cited public documents which recorded (a) that in 1998 it was estimated that smoking in the United Kingdom caused each year 46,500 deaths from cancer and 40,300 deaths from circulatory diseases, (b) that those who smoke regularly and then die of smoking related disease lose on average 16 years from their life expectancy when compared with non smokers and (c) that in 2005 second hand smoking caused at least 12,000 deaths a year in the United Kingdom. Having regard to the adverse effects that smoking can have on the health of smokers and others exposed to tobacco smoke, I have no difficulty in agreeing with the Second Division that the comprehensive smoking ban pursued the legitimate aim of the protection of health which is recognised in article 8(2). The aim is to protect the detained patient from the health risks of his smoking and other people from the health risks of second hand smoke. The comprehensive smoking ban clearly has a rational connection with the pursuit of that desirable goal. Finally, in order to be necessary in a democratic society in the interests of public health the interference must be proportionate. Again, as is well known, the tests for proportionality (in addition to the tests of the importance of the legitimate objective and the rational connection of the measure to that objective) are (i) whether a less intrusive measure could have been used without unacceptably compromising the achievement of the objective and (ii) whether a fair balance has been struck between the rights of the individual and the interests of the community having regard to (a) the severity of the impact of the measure on the individuals rights and (b) the contribution of the measure to the achievement of the objective: Bank Mellat v HM Treasury (No 2) [2014] AC 700, para 20 per Lord Sumption, para 74 per Lord Reed. No challenge is made to the ban on smoking indoors, where the danger of exposing other patients and supervising staff in designated smoking areas is obvious. The minute (para 12 above) and the document discussed in para 7 above both record that the impugned decision which led to the comprehensive ban resulted from the operational difficulties which the Board faced in operating the partial ban which allowed supervised smoking within the hospital grounds. Those problems threatened to compromise the health of the supervising staff, the welfare of the patients and the security of both. Mr McCann did not challenge the account of events in those documents, which, in my view, this court must treat as the accepted factual background to the impugned decision. Faced with such difficulties, I am satisfied that the Board did not act disproportionately in imposing the comprehensive smoking ban when it did. If there is to be a comprehensive smoking ban, it is likely that the managers of the Board will need to prohibit the possession of tobacco products and also have powers to search for and confiscate such products. As counsel for Mr McCann does not dispute that the introduction of such measures in accordance with the 2003 Act, the Code of Practice, and the 2005 Regulations would comply with the ECHR, it is not necessary further to consider the justification of those measures if they are introduced in that way. Accordingly, but for the illegality under our domestic law of the prohibition of possession of tobacco products, the searches and the confiscation of tobacco products which are part of the impugned decision, I would have held that the decision was not contrary to Mr McCanns article 8 right to respect for his private life. Article 14 of the ECHR Because the impugned decision fell within the ambit of article 8, it is necessary to address briefly the challenge under article 14 of the ECHR that the Board has treated Mr McCann in a discriminatory manner which cannot be justified. I am satisfied that this challenge fails for three principal reasons. First, the Scottish Government is committed to extending the ban on smoking to all NHS facilities over time and also to extending the ban to prisons. As a result, secondly, the differences in treatment between detained patients in the State Hospital on the one hand and patients in other NHS facilities or prisoners detained in prison are a matter of timing rather than policy. The circumstances of individual public institutions will vary and each enjoys an area of discretion on how and at what speed it implements its anti smoking policy. Thirdly, the explanation for the timing of the impugned decision is the documented difficulties of the partial smoking ban in the State Hospital which justified the introduction of the comprehensive smoking ban when it occurred. It is therefore unnecessary to consider the differences between the circumstances of Mr McCann on the one hand and the circumstances of these groups of people on the other. Further, I am not persuaded that there is any unjustified discrimination when detained patients are compared with the general public at liberty. The circumstances of such members of the public are radically different as (i) they have opportunities to smoke in places which do not expose others to second hand smoke, and (ii) the public authorities do not have any legal duty of care to create a safe therapeutic environment for them or to protect their own staff from injury to health when they are in the public sphere and not acting in the course of their employment. The documents to which I referred in paras 7 and 12 above reveal the problems of allowing smoking out of doors in a secure hospital. Such problems do not occur among the general public. The differences between the anti smoking policies applied to them and the comprehensive ban in the State Hospital can readily be justified. It may be that the effects of smoking on patients with certain mental illnesses provide a further ground of distinction between mental health patients and those with whom Mr McCann wishes to be compared. The Board referred in its written case to the strong association between poor mental health and smoking (which was also discussed in the evidential findings in the Rampton Hospital case) and there was a suggestion in the documents which suggested that smoking reduced the efficacy of clozapine, a drug for treating schizophrenia. This was not explored in any detail in this appeal but I do not need to rely on it in reaching my view. The article 14 challenge therefore fails. Conclusion I would allow the appeal but only to the extent that the prohibition on having tobacco products and the search and confiscation regime in the impugned decision are unlawful under our domestic law because they do not comply with the 2003 Act and the 2005 Regulations (paras 40 and 41 above). In consequence, the impugned decision infringes Mr McCanns article 8 rights but only because the decision is not in accordance with our domestic law (para 62 above). Otherwise I would dismiss the appeal. I would invite parties to provide written submissions on the appropriate form of order within 21 days of the handing down of this judgment.