The last significant part of the Dutch Empire lasted until WWII. Japan invaded the Dutch East Indies and held until 1945. The colony was not returned to the Dutch. The area became Indonesia. Inevitably, the Dutch and the English, the leading maritime trading nations of the world, came into sharp commercial rivalry and military conflict. The issues between the two countries were contested, but not settled, by the two Anglo-Dutch Wars, the first waged from 1652 to 1654 and the second from 1664 to 1667. As a result of the latter conflict the Dutch lost New Amsterdam in North America but acquired Dutch Guiana (now Suriname). Other wars, costly in lives and money, followed against England and France.
After the War of the Spanish Succession (1701-1714), in which the Dutch were allies of the British against the French, the economic and political power of the Netherlands began to decline. Eventually the Dutch Republic was overshadowed by the expanding power of the United Kingdom on the sea and France on the land.
When William III died without heirs in 1702, a distant relative of his, John William Friso, successfully claimed the Orange title. In 1747 his son became stadtholder in all seven provinces as William IV.
In the late 18th century a struggle broke out between the party of the house of Orange, which had become conservative, and the Patriot Party, which desired democratic reforms. The Orange Party enjoyed a brief triumph with the help of an invading Prussian army in 1787, but in 1795 French troops and a force consisting of self-exiled Dutch citizens replaced the republic of the seven United Provinces with the Batavian Republic, which was modeled on the revolutionary French Republic.