At Her Majesty's pleasure (sometimes abbreviated to Queen's pleasure or, when applicable, at His Majesty's pleasure or King's pleasure; Welsh: wrth ewyllys Ei Mawrhydi/Fawrhydi) is a legal term of art referring to the indeterminate or undetermined length of service of certain appointed officials or the indeterminate sentences of some prisoners. It is based on the concept that all legitimate authority for government comes from the Crown. Originating in the United Kingdom, it is now used throughout the Commonwealth realms. In realms where the monarch is represented by a governor-general, governor or administrator, the phrase may be modified to be at the Governor's pleasure, since the governor-general, governor, lieutenant governor or administrator is the Queen's personal representative in the country, state or province.
People appointed by the sovereign to serve the Crown and who have no set limit to the time they occupy their given office--for example, governors general and ministers of the Crown--are said to serve at Her Majesty's pleasure. In Canada, provincial lieutenant governors are appointed by the Canadian monarch's federal representative, the governor general, and are thus described in the Constitution Act, 1867, as holding office "during the pleasure of the Governor General". Similarly, Australian ministers of the Crown are, by the Commonwealth of Australia Constitution Act 1900, appointed to serve "during the pleasure of the Governor-General".
The term is used to describe detention in prison for an indefinite length of time; a judge may rule that a person be "detained at Her Majesty's pleasure" for serious offences or based on a successful insanity defence. This is sometimes used where there is a great risk of re-offending; however, it is most often used for juvenile offenders, usually as a substitute for life sentencing (which might be much longer for younger offenders). For example, section 90 of the United Kingdom's Powers of Criminal Courts (Sentencing) Act 2000 (which only extends to England and Wales) states: "Where a person convicted of murder or any other offence the sentence for which is fixed by law as life imprisonment appears to the court to have been aged under 18 at the time the offence was committed, the court shall (notwithstanding anything in this or any other Act) sentence him to be detained during Her Majesty's pleasure."
Prisoners held at Her Majesty's pleasure are frequently reviewed to determine whether their sentence can be deemed complete; although this power traditionally rested with the monarch, such reviews are now made by others--the Secretary of State for Justice in England and Wales, for instance. Minimum terms are also set, before which the prisoner cannot be released; in England and Wales, these were originally set by the Home Secretary, but since 30 November 2000 have been set by the trial judge. Prisoners' sentences are typically deemed to be complete when the reviewing body is "satisfied that there has been a significant change in the offender's attitude and behaviour".
In Hong Kong, following the transfer of its sovereignty to China in 1997, the term was modified to "at executive discretion". Subsequently this was held to be incompatible with the separation of powers enshrined in the Basic Law by Judge Michael Hartmann in the case Yau Kwong Man v. Secretary for Security.