The transformation from the open sea policies of the early Qing Dynasty (1644–1911) to the rise of the Guangzhou System was a process that took many years. It began with the capture of Taiwan from the Zheng family regime in 1683 and the opening of multiple Chinese ports to trade in 1684. Over the next four decades, Qing officials experimented with different ways of managing trade, and by about 1700, Guangzhou had emerged as one of the most successful at attracting foreign ships. The practices that were found to be most effective at maintaining control—while at the same time encouraging foreigners to return each year—were gradually incorporated into the city’s commercial policies. By the 1720s, all of the basic features of what came to be called the Guangzhou System were firmly in place. In 1757, the Qing government closed other Chinese ports to foreign trade, which guaranteed that Guangzhou would remain the center of commerce up to the signing of the Treaty of Nanjing in 1842.