The Anglo-Japanese Friendship Treaty (Japanese: 日英和親条約 Hepburn: Nichi-Ei Washin Jōyaku?, The Anglo Japanese Convention of 1854) was the first treaty between the United Kingdom and the Empire of Japan, then under the administration of the Tokugawa shogunate. Signed on October 14, 1854 it paralleled the Convention of Kanagawa, a similar agreement between Japan and the United States six months earlier which effectively ended Japan's 220-year-old policy of national seclusion (sakoku). As a result of the treaty, the ports of Nagasaki and Hakodate were opened to British vessels, and Britain was granted most favored nation status with other western powers.
Anglo-Japanese relations began in 1600 at the start of the Tokugawa shogunate with the arrival of William Adams, a seaman from Gillingham, Kent, who became an advisor to Tokugawa Ieyasu. He facilitated the creation of a British trading post at Hirado in 1613, led by English captain John Saris, who obtained a Red Seal permit giving "free licence to abide, buy, sell and barter" in Japan. However, during the ten year activity of the company between 1613 and 1623, apart from the first ship (Clove in 1613), only three other English ships brought cargoes directly from London to Japan. The British withdrew in 1623 without seeking permission from the Japanese, and in 1639, the Tokugawa shogunate announced a policy of isolating the country from outside influences with foreign trade to be maintained only with the Dutch and the Chinese exclusively at Nagasaki under a strict government monopoly. The isolation policy was challenged several times by the British, most notably in 1673, when an English ship named "Returner" visited Nagasaki harbor, and was refused permission to renew trading relations, and in 1808, when the warship HMS Phaeton entered Nagasaki during the Napoleonic War to attack Dutch shipping and threatened to destroy the town unless it was provided with supplies.