Gaikoku bugyō
were the commissioners or "magistrates of foreign affairs" appointed at the end of the Edo era by the Tokugawa shogunate to oversee trade and diplomatic relations with foreign countries. In essence this was the beginning of the creation of a Ministry of Foreign Affairs after Japan's long period of isolationist policy. Historical background

The Gaikoku bugyō system began just prior to the negotiations which resulted in the Harris Treaty. First appointed in August 1858, the gaikoku-bugyō were shogunate officials who were charged with advising the government on foreign affairs and who were tasked with conducting negotiations with foreign diplomats both in Japan and abroad. This was a high-ranking office, in status roughly equivalent to that of kanjō-bugyō, or expressed differently, the status of this office ranked slightly below that of daimyō. The number of gaikoku bugyō varied, from five in 1858 to a maximum of 13, with wide variations in the numbers of officials who were appointed across the span of years. The office was often held concurrently with that of kanjō-bugyō or the office was held concurrently by those serving the shogunate as governor of one of the great ports (Nagasaki bugyō or Kanagawa bugyō). The Gaikoku bugyō system ended in 1869 when the new Meiji government was formed; but some of the foundational work of this period proved useful to the nascent Ministry of Foreign Affairs. Some 70 Gaikoku bugyō commissioners were named during this significant period. Hotta succeeded Abe Masahiro, and in his years at the post had to address the issue of the Harris Treaty of 1858. The genesis of the gaikoku-bugyō pre-dates the actual creation of the office. Kaibō-gakari
The prefix kaibō-gakari meaning "in charge of maritime defense" was used with the titles of some shogunate officials after 1845. This term was used to designate those who bore a special responsibility for overseeing coastal waters, and by implication, for dealing with matters involving foreigners—for example, kaibō-gakari-ōmetsuke which later came to be superseded by the term gaikoku-gakari. Gaikoku-bōeki-torishirabe-gakari
Rōjū Hotta Masayoshi formed an ad hoc committee of shogunate officials with special knowledge of foreign affairs, and he himself headed this working group. In November 1856, he appointed the members and charged them to come up with recommendations about the terms for opening Japanese ports. The results of their deliberations would become the basis for negotiations which ultimately resulted in the Harris Treaty (the Treaty of Amity and Commerce between Japan and the United States). List of gaikoku bugyō
The numbers of gaikoku bugyō varied throughout the Edo period:

 Iwase Tadanari (1858). Tsutsui Masanori (1858). Inoue Kiyonao (1858–1859, 1862–1863, 1864). Nagai Naoyuki (1858–1859, 1865–1867). Mizuno Tadanori (1858–1859, 1861–1862). Hori Toshihiro (1858–1860)
 Watanabe Takatsuna (1859)
 Matsudaira Yasuhide (1859–1860, 1861–1863)
 Takemoto Masao (1859–1862, 1863–1864). Sakai Tadayuki (1859–1860)
 Mizoguchi Naokiyo (1859–1860)
 Shinmi Masaoki (1859–1862)
 Matsudaira Yasunao (1860, 1861–1863). Oguri Tadamasa (1860–1861). Takeuchi Yasunori (1861–1864). Okubo Ichio (1861–1862). Abe Masatō (1862–1863). Kawaji Toshiaki (1863). Ikeda Nagaaki (1863–1864). Kawazu Sukekuni (1863–1864). Shibata Takenaka (1863–1868). Sasaki Akinori (1864)
 Tsuchiya Masanao (1864)
 Kinoshita Toshiyoshi (1865–1866)
 Kurimoto Joun (1865–1866, 1866–1867). Yamaguchi Naoki (1865–1866, 1867)
 Asagara Masahiro (1865–1867)
 Gōhara Isaburo (1866)
 Hirayama Seisei (1866–1868). Narushima Ryūhoku (1866). Koide Hidezane (1866–1867)
 Tsukahara Masayoshi (1866–1867)
 Mukōyama Ippaku (1866–1868)
 Ishikawa Toshimasa (1867–1868)
 Hiraoka Jun (1867–1868)
 Narishima Hiroshi (1868)

See also
 Bugyō
 Late Tokugawa shogunate
 Hayashi Akira
 Foreign relations of Imperial China
 Hua-Yi distinction

Notes

References
 Beasley, W. G. (1955). Select Documents on Japanese Foreign Policy, 1853–1868. London: Oxford University Press; reprinted by RoutledgeCurzon, London, 2001. Cullen, L. M. (2003). A History of Japan, 1582–1941: Internal and External Worlds. Cambridge: Cambridge University Press. (cloth)  (paper)
 Doi, Ryōzō. (1997). Bakumatsu gonin no gaikoku bugyo: Kaikoku o jitsugensaseta bushi. Tokyo: Chuokoron-shinsha. Nussbaum, Louis-Frédéric and Käthe Roth. (2005). Japan encyclopedia. Cambridge: Harvard University Press. ;  OCLC 58053128
 Sawada, Janine Anderson. (2004). Practical Pursuits: Religion, Politics and Personal Cultivation in Nineteenth Century Japan. Honolulu: University of Hawaii Press. (cloth)

Government of feudal Japan
Officials of the Tokugawa shogunate
Foreign relations of the Tokugawa shogunate