At that time, Chinese authorities limited trade with the outside world to the port of Canton. All foreign traders were further restricted to living and working on factory compounds established on the banks of the Pearl River. American trade with China increased steadily throughout the early decades of the nineteenth century, although there were long periods during which the office of the U.S. Consul at Canton was unoccupied, and Americans serving at the consulate typically did not speak Chinese. In the wake of the Opium War between China and Great Britain, however, the Chinese government was compelled to expand trading opportunities beyond Canton. After the conclusion of the hostilities, the first U.S. formal mission to China, led by former Congressman Caleb Cushing, brokered the 1844 Treaty of Wanghia, an agreement which secured trading privileges for American merchants and opened new Chinese ports to American vessels. In addition to protecting the interests of United States merchants, American consuls enjoyed greater authority granted by Congress; in 1848 the consulate was allowed to arraign U.S. citizens charged with offenses against the laws of China. The Canton consulate was burned down in 1856, but U.S. diplomats continued to support an expanding American presence in the region throughout the nineteenth century.