The Second Opium War (1856–1860) was fought to guarantee European sovereignty of the seas after a Chinese-owned and British-registered ship, "The Arrow", was seized in 1856 for being involved in smuggling and piracy. Since it had been flying the British Ensign, the British government pressed for an apology. They allied with France and Russia and invaded China from 1857 to 1858. In 1858, China sued for peace and agreed to the Treaty of Tientsin, which allowed the creation of French and English embassies in Beijing, and the Treaty of Aigun, which redrew Russia's border with China.