George IV (George Augustus Frederick; 12 August 1762 – 26 June 1830) was King of the United Kingdom of Great Britain and Ireland and King of Hanover from the death of his father, King George III, on 29 January 1820 until his own death ten years later. From 1811 until his accession, he served as regent during his father's final mental illness. George IV was the eldest child of King George III and Queen Charlotte. He led an extravagant lifestyle that contributed to the fashions of the Regency era. He was a patron of new forms of leisure, style and taste. He commissioned John Nash to build the Royal Pavilion in Brighton and remodel Buckingham Palace, and commissioned Sir Jeffry Wyatville to rebuild Windsor Castle. George's charm and culture earned him the title "the first gentleman of England", but his dissolute way of life and poor relationships with his parents and his wife, Caroline of Brunswick, earned him the contempt of the people and dimmed the prestige of the monarchy. He excluded Caroline from his coronation and asked the government to introduce the unpopular Pains and Penalties Bill in an unsuccessful attempt to divorce her. Despite presiding over the British Empire's emergence as a global hegemon, George IV's rule was tarnished by scandal and financial extravagance. His ministers found his behaviour selfish, unreliable and irresponsible, and he was strongly influenced by favourites. Taxpayers were angry at his wasteful spending during the Napoleonic Wars. During most of George's regency and reign, Lord Liverpool controlled the government as Prime Minister of the United Kingdom. Liverpool's government presided over Britain's ultimate victory over Napoleon and negotiated a peace settlement with the French. After Liverpool's retirement, George IV was forced to accept Catholic emancipation despite opposing it. His only legitimate child, Princess Charlotte, predeceased him in 1817; on his death, he was succeeded by his younger brother, King William IV.