In 1757, the Qianlong Emperor decreed Canton as the only port where foreign trade transactions were permitted. Westerners, including Americans, lived and worked in the Thirteen Factories area located on the banks of the Pearl River (Zhu Jiang). This district flourished until the 1842 Treaty of Nanking (Nanjing), when other ports in China opened to foreigners, diminishing Canton’s monopoly over trade with the West.