Commodore Matthew Perry of the United States and his fleet of black ships arrived in Japan in 1853, on a mission to compel Japan to open its ports to international trade. The Japanese were well aware of the military humiliations suffered by China. Rather than risk a comprehensive defeat, Japan signed a treaty in 1854, granting the main Western powers trading rights similar to those they already enjoyed in China.