William , the third son of George III of the United Kingdom and younger brother and successor to George IV was the last person to rule both the United Kingdom and Hanover . William , the third son of George III and younger brother and successor to George IV , was the last king and penultimate monarch of the House of Hanover .