During the King's frequent absences Mary ruled England. In 1689, the Queen's sister Anne, after many miscarriages and stillbirths, gave birth to a son who survived, an heir to the throne in the next generation, named William in honour of the King. William created the boy Duke of Gloucester.
Anne was dominated by her friend Sarah Churchill. A petty quarrel which developed between the sisters was made far worse by the interference of the termagant Sarah. William disliked Anne's boorish husband, Prince George of Denmark, which he arrogantly made no attempt to conceal. This culminated in Marlborough demanding command of the English forces, greatly angering the King, who in 1692 dismissed Marlborough from office. Mary failed to visit Anne during her subsequent pregnancy, the two sisters were never to speak to each other again.
The unruly Catholic Highland clans were percieved as a threat to William's government. Consequently, the Highland chiefs were ordered to take the Oath of Allegiance by 1st January, 1692. The chief of the McDonald's of Glencoe delayed taking the oath until late December,1691, and was informed on arrival at Fort William, that it could only be carried out in the presence of a sheriff and the nearest was forty miles away at Inverrary. Macdonald proceeded there to take the oath, but after the allotted deadline.
Sir John Dalrymple, the Secretary of Scotland despised the lawless clans, seizing the opportunity presented by MacDonald, he issued instructions to remove "that set of thieves" the McDonald's of Glencoe. The certificate of McDonald's late oath was sent to Edinburgh but the government were not duly informed of McDonald's taking of the oath.
Campbell of Glenlyon, with over a hundred armed men, had enjoyed the McDonald's hospitality for a number of days, when on 13th February, they slaughtered men, women and children, in all nearly forty people were killed, a few of them managed to escape to the safety of the hills.
In the summer of 1695, the Scottish Parliament conducted an enquiry into the Glencoe affair and voted that it was a murder, naming those whom it considered responsible. William was asked directly to bring those responsible to justice but did nothing to comply with the request.
In December, 1694, Mary fell ill with smallpox, the disease that had killed both of William's parents. The Queen's condition steadily deteriorated. William was distraught but remained at her bedside until the end. Queen Mary died aged only thirty-two on 28th December. William was prostrate with grief at her death. It was to be several months before he managed to come to terms with the loss of his wife.
Charles II, King of Spain, was unlikely to live much longer and the Spanish throne had no direct male heir. The pathetic victim of generations of Habsburg inbreeding, Charles was both mentally and physically retarded. He suffered from severe epilepsy and in him the Habsburg lower jaw was so pronounced as to appear as a caricature. He could not even chew food properly, leading to digestive problems.
There were three claimants to the Spanish Empire. Phillip of Anjou, the grandson of Louis XIV, had a good claim through his grandmother, Maria Theresa of Spain, who was Charles' half-sister. The Electoral Prince of Bavaria put forward his own plausible claim. The Habsburg Emperor Leopold II also had a claim, which he resigned to his son, Charles. In the highly inbred Habsburg family, Leopold was both the uncle and first cousin twice over to Charles II.
A first partition treaty was signed in 1698 by William, Louis XIV of France and the Dutch. This divided the Spanish inheritance, with the largest part going to the Bavarian Prince. His death in 1699 occasioned a new treaty, which was signed a year later dividing the inheritance between the French and Imperial claimants.
Charles II died in November 1700 leaving the entire undivided Habsburg inheritance to his great nephew, Phillip of Anjou, in his will. War broke out between France and Austria. When James II died in September 1701, Louis officially recognised his son as James III. This action pushed Parliament into entering the war.
The heir to the throne, Anne's only surviving child, William, Duke of Gloucester, a delicate child who suffered from water on the brain, died in July,1700. Although there were many who possessed a superior claim, the next Protestant in the line of succession was Sophia, Electress of Hanover. She was the youngest child of James I's daughter Elizabeth who had married Frederick, the Elector Palatine and was married to Ernest Augustus, Electoral Prince of Hanover. In 1701 the succession was fixed, after the death of Anne, on Sophia and her heirs, by Act of Parliament.
On 21st February, 1702, William's horse stumbled on a molehill while he was out riding, causing him to fall badly and break his collar bone. He was unwell throughout the following month and did not recover from the accident. By the first week in March, his condition had deteriorated so badly that it became obvious that he was unlikely to survive.
King William III died on 7th March 1702. He was later found to have kept a lock of Mary's hair and her wedding ring next to his heart. His death was not greatly lamented in England, where he had never been liked. The Jacobites ever after drunk a toast "to the little gentleman in black velvet."