Japan began this period in near anarchy with warring clans fighting with each other. In the 16th century it was united. Westerners first arrived in Japan during this period. During the first part of the 17th century fear of western influence resulted in the banning of Westerners from Japan. The visit by American naval officer Mathew Perry forced the Japanese to open to western trade and simultaneously attempt a rapid modernization of the country.