The Republic had learned its lesson from the Year of Disaster and realized it could no longer give priority to its commercial interests. The navy and the army had to be kept at the ready in spite of the tremendous costs involved. France, in particular, remained a constant danger. It had conquered a large part of the southern provinces and threatened to become the Republic's direct neighbor. The Republic had managed to prevent this by signing the 1678 peace treaty, but some of its allies, like the Emperor of Austria and the King of Spain, felt this treaty had let them down and pursued the war with France. Neither had William III wanted to conclude peace with France in 1678, but he had to give in when Holland cut off the supply of money. Holland's desire for peace had mainly been motivated by the fact that its economy was suffering. The Stadholder, for one, was keen enough to realize that a peace treaty would not diminish the French king's ambitions. Louis XIV still wanted France to become Europe's most powerful country and to enlarge its territory until it reached the Rhine.
France had many enemies, but only a few of them could offer effective resistance. William III was capable of doing so, but he realized he would never be able to do so on his own. In 1688, his position changed in a spectacular way when he became also King of England. In 1677 he had married Mary Stuart, a niece of Charles II, King of England at the time. In November 1688, after Mary's Catholic father had become King of England as James II (1685) and had threatened to side with France, William III gathered his forces and landed in England. In February 1689, he managed to get Parliament to name him and his wife King and Queen of England. He thus secured the power he needed to fight Louis XIV.
William's ‘coup' led France to declare war on the Republic that same month. Six months later almost all the enemies of Louis XIV, including Spain, which still ruled the southern provinces of the Low Countries, joined together in a large alliance with William III heading the coalition. The ensuing war took place mainly in the southern provinces and at sea, with varying success. In September 1695, side by side with the governor of the southern provinces Maximilian II Emanuel of Bavaria, he took the important fortified city of Namur, which Louis XIV had seized three years previously. A couple of weeks earlier, on the other hand, the French had subjected Brussels, the capital of the southern provinces, to heavy shelling, completely destroying the Grande Place, among other targets. After nine years, the war ended in 1697 with the Treaty of Rijswijk: Louis XIV recognized William III as King of England and returned all his conquests in the southern provinces to Spain. This was also in the interest of the Republic: the south could go on acting as a buffer.
William III died in 1702. A new war was raging then, the War of Spanish Succession, that was to last until 1713. Once more, the conflict centered on the southern provinces. However, the Republic's influence was hardly as great as in the past. Moreover, the States of Holland, together with four of the other provinces, had decided not to appoint a new Stadholder after the death of William III. More and more, the Republic withdrew into itself: the years of glory were really over.