William IV (William Henry; 21 August 1765 – 20 June 1837) was King of the United Kingdom of Great Britain and Ireland and King of Hanover from 26 June 1830 until his death in 1837. The third son of George III, William succeeded his elder brother George IV, becoming the last king and penultimate monarch of Britain's House of Hanover.
William served in the Royal Navy in his youth, spending time in North America and the Caribbean, and was later nicknamed the "Sailor King". In 1789, he was created Duke of Clarence and St Andrews. In 1827, he was appointed as Britain's first Lord High Admiral since 1709. As his two older brothers died without leaving legitimate issue, he inherited the throne when he was 64 years old. His reign saw several reforms: the poor law was updated, child labour restricted, slavery abolished in nearly all of the British Empire, and the British electoral system refashioned by the Reform Act 1832. Although William did not engage in politics as much as his brother or his father, he was the last monarch to appoint a prime minister contrary to the will of Parliament. Through his brother Adolphus, the Viceroy of Hanover, he granted his German kingdom a short-lived liberal constitution.
At the time of his death William had no surviving legitimate children, but he was survived by eight of the ten illegitimate children he had by the actress Dorothea Jordan, with whom he cohabited for twenty years. Late in life, he married and apparently remained faithful to the young princess who would become Queen Adelaide. William was succeeded in the United Kingdom by his niece Victoria and in Hanover by his brother Ernest Augustus.