Japan had been closed to the outside world for over two centuries under a policy of "sakoku" (literally, "closed country"), which was intended to protect the country from foreign influence and maintain its traditional way of life. However, the arrival of Perry's fleet and the show of force it represented convinced the Japanese that they could not resist the demands of the Western powers.
In 1858, Japan signed the Treaty of Amity and Commerce with the United States, which granted the United States the rights to trade with Japan and to have a permanent diplomatic presence in Edo. This treaty was followed by similar treaties with other Western countries, including Britain, France, Russia, and the Netherlands.
The opening of Japan to the West had a profound impact on the country. It led to the development of a modern economy, the adoption of Western technology and culture, and the eventual rise of Japan as a major world power.