China restricted outside trade under the Canton System to only one port and refused all official diplomatic relations except to tributary countries. In 1833-35 as London ended the East India Company's monopoly on trade with China, both Tory and Whig governments sought to maintain peace and good trade relations. However Lord Napier wanted to provoke a revolution in China that would open trade. The Foreign Office, led by Palmerston, stood opposed and sought peace. The Chinese government refused to change, and interdicted the British smugglers bringing in opium from India, which was banned in China. Britain responded with military force in the First Opium War, 1839–42, which ended in a decisive British victory. Under the Treaty of Nanjing, China paid an indemnity and opened five treaty ports to world trade. In those ports there would be extraterritorial rights for British citizens. Palmerston thus achieved his main goals of diplomatic equality and opening China to trade. However his angry critics focused on the immorality of the opium trade.