The war of 1672–78 was the first of the great wars of Louis XIV of France. It was fought to end Dutch competition with French trade and to extend Louis XIV's empire. Having obtained the support of Charles II of England by the secret Treaty of Dover (1670) and allied himself with Sweden and several German states, Louis overran the southern provinces of the Netherlands (May, 1672). The Dutch stopped his advance on Amsterdam by opening the dikes; about the same time, under the command of De Ruyter, the Dutch defeated the English and French fleets at Southwold Bay. When Dutch peace proposals made at this juncture were spurned by the French, a revolution broke out, and William of Orange (later William III of England) took over Dutch leadership from the ill-fated Jan de Witt (July, 1672). William's attempt to divide the French lines and enter France was countered by the French seizure of Maastricht (1673). By the end of the year the French were forced to retreat, and Spain, the Holy Roman emperor, Brandenburg, Denmark, and other powers entered the war on the side of the Dutch. In 1674, England made peace with the Dutch. Nevertheless, the military situation changed in favor of France. In 1674, Louis II de Condé (see Command) won the battle of Seneff, while Turenne (see Command) was victorious at Sinzheim. The defeats Créquy suffered in 1675 were balanced by the successful naval campaign of Abraham Duquesne in 1676, and in 1677 the French defeated William at Cassel and took Freiburg. Peace was negotiated at Nijmegen in 1678. Maastricht was ceded to the Dutch and a trade treaty modified the French restrictive tariffs in favor of the Dutch. By a subsequent treaty with Spain, Louis received Franche-Comté and a chain of border fortresses in return for evacuating the Spanish Netherlands. By a treaty with the Holy Roman emperor (1679), France was confirmed in possession of Freiburg and a part of Lorraine.