The Treaty of Amity and Commerce (United States–Japan) of 1858, otherwise known as the "Harris Treaty" stipulated that the ports of Kanagawa, Hakodate, Nagasaki, Hyōgō and Niiigata be opened to foreign trade as treaty ports. Similar treaties were also signed with the United Kingdom, France, the Netherlands and Russia. Niigata was the largest port on the Sea of Japan which was under direct control of the Tokugawa Shogunate. However, in the case of Niigata, no action was taken until after the Meiji restoration and the port was only declared open to foreign shipping in 1868. The Niigata Customs House building was built in 1869, initially as a shipping office to coordinate the loading and unloading of vessels and warehousing of cargo, but from 1873 to 1966 was used as a government office to collect customs duties.