The year 1672 proved calamitous for the Dutch Republic, becoming known as the "disaster year". Although the Anglo-French fleet was disabled by the
Battle of Solebay, the Netherlands were invaded by
France, under
Louis XIV, who had the aid of
England, (
Third Anglo-Dutch War), Münster, and
Cologne. In June the French army quickly overran Gelderland and Utrecht and the
States of Overijssel surrendered on
5 July to Münster; William on
14 June withdrew with the remnants of his field army into Holland, where the States on
8 June had ordered to flood the
Dutch Water Line. Louis XIV, believing the war was over, began negotiations to extort as large a sum of money from the Dutch as possible. The presence of a large French army in the heart of the Republic caused a general panic. There were many disturbances and in most cities the councils turned orangist. On
4 July the States of Holland appointed William stadtholder; on
9 July he made his oath. On
5 July a special envoy of Charles,
Lord Arlington, met with William in
Nieuwerbrug, offering to make William Sovereign Prince of Holland if he would capitulate — whereas a stadtholder was a mere civil servant. William refused, upon which Arlington threatened that William would then witness the end of his state. William made his famous answer: "There is one way to avoid this: to die defending it in the last ditch". On
7 July the inundations were complete and the further advance of the French army, to its great surprise, effectively blocked. On
16 July Zealand offered the stadtholderate to William. The same day England promised Louis in the
Accord of Heeswijk never to conclude a separate peace. On
18 July William received a letter from Charles, claiming that the only real obstacle to peace was the continued influence of De Witt and his faction. William sent a secret letter back offering ₤400,000,
Surinam and
Sluys; in return Charles should make him Sovereign Prince and conclude a separate peace. Charles, greatly annoyed, refused, accusing William of scheming behind his back with "Whig" leaders.
Johan De Witt had been unable to function as
Grand Pensionary after having been wounded by an attempt on his life on
21 June. On
15 August William published Charles's letter of
18 July to incite the populace against De Witt. On
20 August, he and his brother,
Cornelis de Witt, were brutally murdered by an orangist
civil militia in The Hague. Today, some historians believe that William may have been directly complicit in the murder.
Gaspar Fagel now became Grand Pensionary. After this William replaced 130 regents with his followers. He was also appointed
Admiral-General of the Netherlands.
William III continued to fight against the invaders from England and France, allying himself with
Spain. In November 1672 he took his army to
Maastricht to threaten the French supply lines. In August 1672 Münster had lifted the siege of
Groningen and in December the territory of
Drenthe was liberated. In 1673 the situation further improved. Though Louis took Maastricht and an audacious attack of William against
Charleroi failed,
Lieutenant-Admiral Michiel de Ruyter defeated the Anglo-French fleet three times, forcing Charles to end England's involvement by the
Treaty of Westminster (1674); from late 1673 onwards France slowly withdrew from the territory of the Republic with the exception of Maastricht. Fagel now proposed to treat the liberated provinces of Utrecht, Gelderland (Guelders) and Overijssel as conquered territory (
Generality Lands), as punishment for their quick surrender to the enemy. William refused but obtained a special mandate from the States-General to newly appoint all delegates in the States of these provinces. William tried to exploit this to fulfill his desire to become sovereign. His followers in the States of Utrecht on
26 April 1674 appointed him hereditary stadtholder in the male line of descent. The
States of Guelders on
30 January 1675 offered the titles of Duke of Guelders and Count of
Zutphen. Very negative reactions to this from Zealand and the city of Amsterdam, where the
stock market collapsed, made William ultimately decide to decline these honours; in 1675 he was merely appointed stadtholder of Gelderland and Overijssel.
Meanwhile the war lingered on as the French army was much too strong to be decisively defeated in open battle. To strengthen his position, William endeavoured to marry his first cousin
Mary, the daughter of James, Duke of York (the future
James II of England), against the desire of her father, who was forced by Charles to comply. The marriage occurred on
4 November 1677; after a difficult start the marriage was a success although fruitless. His finances exhausted and tired of the war the King of France, Louis XIV, made peace in 1678.
William however remained very suspicious of Louis, thinking the French king desired "Universal Kingship" over Europe, whereas Louis described William as "my mortal enemy" and saw him as an obnoxious warmonger. Continued smaller French annexations in Germany (the
Réunion policy) and the recalling of the
Edict of Nantes in 1685, causing a surge of
Huguenot refugees to the Republic, led William III to join all kinds of anti-French alliances, such as the
Association League, culminating in the
League of Augsburg (an anti-French coalition which also included the
Holy Roman Empire, Sweden, Spain and several
German states) of 1686.
After his marriage, William became a possible candidate for the English throne if his father-in-law (and uncle) James would be excluded because of his Catholicism. During the crisis concerning the
Exclusion Bill, in 1680 first Charles invited William to come to England to bolster the king's position against the
exclusionists; then withdrew his invitation — after which
Lord Sunderland also tried to bring William over but now to put pressure on Charles. The ever cautious stadtholder remained at home however. Nevertheless he secretly made the States-General send the
Insinuation to Charles, beseeching the king, without naming James explicitly, to prevent that any Catholic would be his successor. Receiving indignant reactions from Charles and James, William denied any involvement.
In 1685, when James II ascended, William at first attempted to conciliate James, whom he hoped would join the League of Augsburg, whilst at the same time trying not to offend the Protestant party in England. At the time William and Mary were still direct heirs. But by 1687, it became clear that James would not join the League and in November his wife
Mary of Modena was announced to be pregnant. That month, to gain the favour of English Protestants, William in an
open letter expressed his disapproval of James's religious policies. Seeing him as a friend, and often having maintained secret contacts with him for years, many English politicians began to negotiate an armed invasion of England.