William was given command of the Dutch army. He successfully halted the advance of the French army and negotiated favourable peace terms at Nijmegen in 1678.
In June 1685, the Duke of Monmouth landed in England with a small army. As he was a Protestant he expected most of the population to support his claim to the throne, but people in England were unwilling to get involved in another Civil War. Monmouth was therefore easily defeated by the king's army.
After this victory James tried to place Catholic friends in positions of power. However, the Test Acts made it impossible for him to do this. When Parliament refused to change these laws, he ignored it and began appointing Catholics to senior positions in the army and the government.
James also announced that he intended to allow Catholics to have complete religious freedom in England. When the Archbishop of Canterbury and six other bishops objected to this, James gave instructions for them to be arrested and sent to the Tower of London.
Some members of the House of Commons sent messages to Holland inviting William and Mary to come to England. Mary and William were told that, as they were Protestants, they would have the support of Parliament if they attempted to overthrow James.
In November 1688, William and his Dutch army arrived in England. When the English army refused to accept the orders of their Catholic officers, James fled to France. As the overthrow of James had taken place without a violent Civil War, this event became known as the Glorious Revolution.
William and Mary were now appointed by Parliament as joint sovereigns. However, Parliament was determined that it would not have another monarch that ruled without its consent. The king and queen had to promise they would always obey laws made by Parliament. They also agreed that they would never raise money without Parliament's permission. So that they could not get their own way by the use of force, William and Mary were not allowed to keep control of their own army. In 1689 this agreement was confirmed by the passing of the Bill of Rights.
William also defeated the supporters of James at Killiecrankie (1689), Boyne (1690) and Limerick (1691). He also led a successful military campaign in Europe.
Mary died of smallpox in 1694. William now ruled on his own and important reforms included the establishment of the Bank of England (1694) and removing restrictions on the press (1695). In 1698 William transferred control of the standing army to the House of Commons.
William III died after falling from his horse in 1702. He was childless and was succeeded by Mary's sister, Anne.