On 6 November 1817 Princess Charlotte of Wales died whilst giving birth to a stillborn boy, plunging the British monarchy into a succession crisis. This is not the first succession crisis that the British Monarchy faced in its 1000 year history, but it is the most recent that we have seen.
Princess Charlotte was the only child of HRH The Prince Regent, and the only legitimate grandchild of King George III and Queen Charlotte, and she died giving birth to the next heir to the throne. Her death led to what could have been the extinction of the House of Hanover as at that time only three of King George's sons were married, two living separately from their wives so unlikely to have any children, and the third had yet to have children (and even if he had he had a difficult relationship with his mother), and the youngest of King George's daughters was 40 so likely to be past her best child bearing years.
Upon the death of Princess Charlotte the country was thrown into deep mourning as she was seen as the hope of the nation after a Hanoverian rule that was unpopular and plagued with scandal, but more so the country was thrown into a constitutional crisis. The nearest heir (after George and Charlotte's children) was a nephew of King George III who himself had no children, thus creating another potential succession crisis. In the wake of this constitutional crisis Parliament forced the sons of King George III to find wives, and thus an absurd competition between the unmarried sons to get married and produce the next heir. The Princes ditched their mistresses and went looking for wives.
The first of the unmarried sons to get married was Prince Edward, Duke of Kent and Strathearn who married Princess Victoria of Saxe-Coburg-Saalfeld on 29 May 1818. Prince William, Duke of Clarence and St Andrews (later King William IV) married Princess Adelaide of Sage-Meiningen on 11 July 1818. The Duke and Duchess of Kent had a daughter on 24 May 1819 christened Alexandrina Victoria, eight months after her birth The Duke of Kent died.
The Duchess of Clarence had three miscarriages, but did have two pregnancies that went full term, and she gave birth to two daughters (Princess Charlotte of Clarence and Princess Elizabeth of Clarence), however neither survived childhood. On the death of his brother in 1830 The Duke of Clarence became King William IV, but as he had no direct heirs he was succeeded by his brothers daughter, Princess Alexandrina Victoria of Kent, who took on the Regnal name Victoria when she inherited the crown at age 18 in 1837. Queen Victoria is the second longest monarch in the United Kingdom, having been surpassed by her Great Great Granddaughter, Her Late Majesty Queen Elizabeth II in 2015, almost 200 years after the succession crisis that led to the birth of Victoria.
Queen Charlotte did not live long enough to see her granddaughter born having died in November 1818, whilst King George III lived until January 1820 never knowing of the death of his eldest grandchild or his wife, nor the birth of his youngest grandchild.