 Kamakura in central Sagami was the capital of Japan during the Kamakura period (1185–1333).During the Edo period, the western part of Sagami Province was governed by the "daimyō" of Odawara Castle, while the eastern part was directly governed by the Tokugawa shogunate in Edo (modern-day Tokyo).Commodore Matthew Perry landed in Kanagawa in 1853 and 1854 and signed the Convention of Kanagawa to force open Japanese ports to the United States.