The Opium Wars arose from China's attempts to suppress the opium trade. British traders had been illegally exporting opium to China, and the resulting widespread addiction was causing serious social and economic disruption in the country. In 1839 the Chinese government confiscated all opium warehoused at Canton by British merchants. The antagonism between the two sides increased a few days later when some drunken British sailors killed a Chinese villager. The British government, which did not trust the Chinese legal system, refused to turn the accused men over to the Chinese courts.
In 1856 the British, seeking to extend their trading rights in China, found an excuse to renew hostilities when some Chinese officials boarded the ship Arrow and lowered the British flag. The French joined the British in this war, using as their excuse the murder of a French missionary in the interior of China.
The allies began military operations in late 1857 and quickly forced the Chinese to sign the treaties of Tientsin (1858), which provided residence in Peking for foreign envoys, the opening of several new ports to Western trade and residence, the right of foreign travel in the interior of China, and freedom of movement for Christian missionaries. In further negotiations in Shanghai later in the year, the importation of opium was legalized. The Chinese, however, refused to ratify the treaties, and the allies resumed hostilities, captured Peking, and burned the emperor's summer palace. In 1860 the Chinese signed the Peking Convention, in which they agreed to observe the treaties of Tientsin.