The prefix "kaibō-gakari" meaning "in charge of maritime defense" was used with the titles of some "bakufu" 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. "Kaibō-gakari-metsuke" later came to be superseded by the term "gaikoku-gakari." These developments preceded the "Gaikoku bugyō" system which began just prior to the negotiations which resulted in the Harris Treaty. First appointed in August 1858, the "gaikoku-bugyō" were bakufu 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.