At His Majesty's pleasure

At His Majesty's pleasure, or at Her Majesty's pleasure, depending on the gender of the monarch, sometimes abbreviated to the King's pleasure or Queen's pleasure, is a term of art in public law and in penal law. Both cases refer to indeterminate or undetermined lengths of time.

In public law, it refers to the length of service of certain appointed officials. This is based on the proposition that certain government officials are appointed by the Crown and can be removed for policy reasons, unlike employees. Originating in the United Kingdom, the phrase is now used throughout the Commonwealth realms, Lesotho, Eswatini, Brunei, and other monarchies, such as the Netherlands and Oman. In realms where the monarch is represented by a governor-general, governor, lieutenant governor, or administrator, the phrase may be modified to be at the governor's pleasure or variations thereof, since the governor-general, governor, lieutenant governor, or administrator is the monarch's personal representative in the country, state, or province; although their own tenure is at the monarch's pleasure.

In penal law, the term is applied to the indeterminate sentences of some prisoners and their detention in prison for an indefinite length of time.