That posed a constitutional crisis in an era when monarchs actively led governments and religion was inextricably intertwined with government. Who would succeed the Protestant Anne as king of England, Scotland and Ireland?
Just 25 years earlier, Anne's father, King James II, a Catholic, was driven out of England in the Glorious Revolution of 1688-89. One of his major offenses: He appointed Catholics to local offices and made them military officers, claiming he could suspend the act of Parliament that required they be members of the Church of England.
The fear was that James would set up an absolutist government, ruling without parliament, just as the most powerful monarch of the day, Louis XIV, had done in France. James had not called a parliament in three years and abolished the colonial legislatures in what would become the United States.
The parliament that installed Anne's sister Mary and her husband (and first cousin), William of Orange, as queen and king got them to agree that monarchs could not suspend laws. That's the example the framers of the U.S. Constitution followed when they required presidents to faithfully execute the law.
After the Duke of Gloucester's death, parliament passed the Act of Settlement of 1701, which barred Catholics and anyone who married a Catholic from the throne. Left disinherited were the next 21 in line, including James' Catholic son, James Edward, who was 26 when Anne died.
Just before Anne died she dismissed her chief ministers, Lords Oxford and Bolingbroke, who had been scheming to have James Edward succeed her. In their place she appointed the Earl of Shrewsbury, a leader in the Glorious Revolution.
Anne's and perhaps England's greatest general, the Duke of Marlborough, organized military forces to repel any attempt to place James Edward on the throne. So when she died, the summons went out to her distant cousin, Georg Ludwig, the Elector of Hanover, the next Protestant in line, to come from Germany to London to be crowned.
And so he was, six weeks later. The Hanoverian succession, as historians call it, had been accomplished. A Jacobite army landed in Scotland in 1715 to install James Edward and landed there in 1745 to install his son, Bonnie Prince Charlie, but both were repulsed after initial victories.
No one can know what these two princes would have done as king. Both were indolent figures, quirky and irresolute. But it's possible that they would have tried to rule without parliaments, would have swept aside the common law courts, as James II did or tried to do.
We do know that Georg Ludwig, installed as King George I, was an unappealing figure. He spoke no English and communicated with ministers in French, the language of European courts. He had shut his wife up in a German castle and brought over two mistresses, one fat and one skinny, and gave them titles of nobility.
He spent enough time in his native Hanover to prompt consideration of a law barring monarchs from leaving the kingdom without permission from parliament.
He and his son George II and chief minister, Sir Robert Walpole, were loathed by the chattering classes of the day. Jonathan Swift's diatribes and fables, John Gay's "Beggar's Opera" and Samuel Johnson's commentary pilloried the Hanoverians as corrupt and in league with the bankers and financiers of the City of London.
The anti-Hanoverian "Cato's Letters" and Bolingbroke's "Idea of a Patriot King" provided arguments and inspiration to the Founding Fathers in North America.
But despite their unpopularity, the Hanoverians served Britain well. Freedom of expression became ingrained. Commerce boomed and generated capital for the Industrial Revolution. The Bank of England enabled Britain to borrow cheaply enough to match and exceed the massive military capacity of France.
Under the Hanoverian kings, the North American colonies enjoyed benign neglect, leaving their local legislatures and town meetings as incubators of the ideas that made America united and free.
So, as we lament the effects of the Great War that broke out 100 years ago, let's remember gratefully what happened 200 years before that.