Two wars between Britain and China. In the early 19th century British traders were illegally importing opium from India to China and trying to increase trade in general. In 1839 the Chinese government confiscated some 20,000 chests of opium from British warehouses in Guangzhou (Canton). In 1840 the British Foreign Secretary, Lord Palmerston, sent a force of 16 British warships, which besieged Guangzhou and threatened Nanjing and communications with the capital. It ended with the Treaty of Nanjing (1842). In 1856 Chinese officials boarded and searched a British flagged ship, the Arrow. The French joined the British in launching a military attack in 1857, at the end of which they demanded that the Chinese agree to the Treaty of Tianjin in 1858. This opened further ports to Western trade and provided freedom of travel to European merchants and Christian missionaries inland. When the emperor refused to ratify the agreement, Beijing was occupied, after which, by the Beijing Convention (1860), the Tianjin Agreement was accepted. By 1900 the number of treaty ports had risen to over 50, with all European colonial powers, as well as the USA, being granted trading concessions.