from the lucrative trade between England and its Caribbean colonies, and led directly to the outbreak of hostilities between the two countries the following year, the first of three Anglo-Dutch Wars that would last on and off for two decades and slowly erode Dutch naval power to England's benefit. In 1661, amidst the Qing conquest of China, Ming general Koxinga led a fleet to invade Formosa. The Dutch defense, led by governor Frederick Coyett, held out for nine months. However, after Koxinga defeated Dutch reinforcements from Java, Coyett surrendered Formosa. The Dutch would never rule Formosa again. The Second Anglo-Dutch War was precipitated in 1664, when English forces moved to capture New Netherland. Under the Treaty of Breda (1667), New Netherland was ceded to England in exchange for the English settlements in Suriname, which had been conquered by Dutch forces earlier that year. Though the Dutch would again take New Netherland in 1673, during the Third Anglo-Dutch War, it was returned to England the following year, thereby ending Dutch rule in continental North America, but leaving behind a large Dutch community under English rule that persisted with its language, church and customs until the mid-18th century. In South America, the Dutch seized Cayenne from the French in 1658 and drove off a French attempt to retake it a year later. However, it was returned to France in 1664, since the colony proved to be unprofitable. It was recaptured by the Dutch in 1676, but was returned again a year later, this time permanently. The Glorious Revolution of 1688 saw the Dutch William of Orange ascend to the throne, and win the English, Scottish, and Irish crowns, ending eighty years of rivalry between the Netherlands and England, while the rivalry with France remained strong. During the American Revolutionary War, Britain declared war on the Netherlands, the Fourth Anglo-Dutch War, in which Britain seized the Dutch colony of Ceylon. Under the Peace of Paris (1783), Ceylon was returned to the Netherlands and Negapatnam ceded to Britain. Napoleonic era (1795–1815) In 1795, the French Revolutionary Army invaded the Dutch Republic and turned the nation into a satellite of France, named the Batavian Republic. Britain, which was at war with France, soon moved to occupy Dutch colonies in Asia, South Africa, and the Caribbean. Under the terms of the Treaty of Amiens signed by Britain and France in 1802, the Cape Colony and the