Prince William Frederick, Duke of Gloucester and Edinburgh, (15 January 1776 – 30 November 1834) was a great-grandson of King George II of Great Britain and the nephew and son-in-law of King George III. He was the grandson of both Frederick, Prince of Wales (George II's eldest son), and Edward Walpole. Prince William married Princess Mary, the fourth daughter of George III. Early life Prince William Frederick was born on 15 January 1776 at Palazzo Teodoli in via del Corso, Rome. His father was Prince William Henry, Duke of Gloucester and Edinburgh, the third son of the Prince of Wales. His mother, Maria, was the illegitimate daughter of Edward Walpole and granddaughter of Robert Walpole. As a great-grandson of George II he held the title of Prince of Great Britain with the style His Highness, not His Royal Highness, at birth. The young prince was baptized at Teodoli Palace, on 12 February 1776 by a Rev Salter. His godparents were his father's cousin and cousin-in-law, the Duke and Duchess of Saxe-Gotha-Altenburg; and the Duke of Gloucester's second cousin, the Margrave of Brandenburg-Ansbach. During his stay in Stockholm in 1802–1803, William's interest and rumoured affair with Aurora Wilhelmina Koskull attracted a lot of attention, and he reportedly had plans to marry her. Queen Charlotte recalled that William said of Koskull: "If she was your daughter, I would marry her!" William was admitted to the University of Cambridge (Trinity College) in 1787, and granted his MA in 1790. He set up his London home at 31 Upper Grosvenor Street, Mayfair. On 25 August 1805, Prince William's father died, and he inherited the titles Duke of Gloucester and Edinburgh and Earl of Connaught. From 1811 until his death William was Chancellor of the University of Cambridge. He was offered the throne of Sweden in 1812 by some members of the Swedish nobility, but the British government would not allow it; the French marshal Jean-Baptiste Bernadotte was eventually selected to become King Charles XIV John. Marriage On 22 July 1816, Prince William married his first cousin Princess Mary, the fourth daughter of King George III. The marriage took place at St. James's Palace, London. On that day, the Prince Regent granted the Duke the style of His Royal Highness by Order in Council. The Duke and Duchess of Gloucester lived at Bagshot Park in Surrey. They had no children together; they had married when