But this ended when American Commodore Matthew C. Perry docked in Edo in 1853. Perry negotiated the opening of two main ports with the Japanese government, leading to severe inflation and subsequent protests from residents.