At the opening of 1712 the Whig majority in the House of Lords was swamped by the creation of twelve Tory peers. Marlborough was dismissed from his command, charged with peculation, and condemned as guilty by a vote of the House of Commons. The Duke at once withdrew from England, and with his withdrawal all opposition to the peace was at an end.

Marlborough's flight was followed by the conclusion of a Treaty at Utrecht between France, England, and the Dutch; and the desertion of his allies forced the Emperor at last to make peace at Rastadt. By these treaties the original aim of the war, that of preventing the possession of France and Spain by the House of Bourbon, was abandoned. No precaution was taken against the dangers it involved to the "balance of power," save by a provision that the two crowns should never be united on a single head, and by Philip's renunciation of all right of succession to the throne of France. The principle on which the Treaties were based was in fact that of the earlier Treaties of Partition. Philip retained Spain and the Indies: but he ceded his possessions in Italy and the Netherlands with the island of Sardinia to Charles of Austria, who had now become Emperor, in satisfaction of his claims; while he handed over Sicily to the Duke of Savoy. To England he gave up not only Minorca but Gibraltar, two positions which secured her the command of the Mediterranean. France had to consent to the re-establishment of the Dutch barrier on a greater scale than before; to pacify the English resentment against the French privateers by the dismantling of Dunkirk; and not only to recognize the right of Anne to the crown, and the Protestant succession in the House of Hanover, but to consent to the expulsion of the Pretender from her soil.

The failure of the Queen's health made the succession the real question of the day, and it was a question which turned all politics into faction and intrigue. The Whigs, who were still formidable in the Commons, and who showed the strength of their party in the Lords by defeating a Treaty of Commerce, in which Boling-broke anticipated the greatest financial triumph of William Pitt and secured freedom of trade between England and France, were zealous for the succession of the Elector; nor did the Tories really contemplate any other plan. But on the means of providing for his succession Harley and Bolingbroke differed widely. Harley inclined to an alliance between the moderate Tories and the Whigs. The policy of Bolingbroke, on the other hand, was so to strengthen the Tories by the utter overthrow of their opponents, that whatever might be the Elector's sympathies they could force their policy on him as King. To ruin his rival's influence he introduced a Schism Bill, which hindered any Nonconformist from acting as a schoolmaster or a tutor; and which broke Harley's plans by creating a more bitter division than ever between Tory and Whig. But its success went beyond his intentions. The Whigs regarded the Bill as the first step in a Jacobite restoration.

The Electress Sophia was herself alarmed, and the Hanoverian ambassador demanded for the son of the Elector, the future George the Second, who had been created Duke of Cambridge, a summons as peer to the coming Parliament, with the aim of securing the presence in England of a Hanoverian Prince in case of the Queen's death. The Queen's anger, fanned by Bolingbroke, broke out in a letter to the Electress which warned her that "such conduct may imperil the succession itself;" and in July Anne was brought to dismiss Harley, now Earl of Oxford, and to construct a strong and united Tory Ministry which would back her in her resistance to the Elector's demand. As the crisis grew nearer, both parties prepared for civil war. In the beginning of 1714 the Whigs had made ready for a rising on the Queen's death, and invited Marlborough from Flanders to head them, in the hope that his name would rally the army to their cause. Bolingbroke, on the other hand, intent on building up a strong Tory party, made the Duke of Ormond, whose sympathies were known to be in favour of the Pretender's succession, Warden of the Cinque Ports, the district in which either claimant of the crown must land, while he gave Scotland in charge to the Jacobite Earl of Mar. But events moved faster than his plans.

Anne was suddenly struck with apoplexy. The Privy Council at once assembled, and at the news the Whig Dukes of Argyll and Somerset entered the Council Chamber without summons and took their places at the board. The step had been taken in secret concert with the Duke of Shrewsbury, who was President of the Council in the Tory Ministry, but a rival of Bolingbroke and an adherent of the Hanoverian succession. The act was a decisive one. The right of the House of Hanover was at once acknowledged, Shrewsbury was nominated as Lord Treasurer by the Council, and the nomination was accepted by the dying Queen. Bolingbroke, though he remained Secretary of State, suddenly found himself powerless and neglected, while the Council took steps to provide for the emergency. Four regiments were summoned to the capital in the expectation of a civil war. But the Jacobites were hopeless and unprepared; and on the death of Anne the Elector George of Hanover, who had become heir to the throne by his mother's death, was proclaimed King of England without a show of opposition.