Located 100 miles off the mainland of Asia, at its closest point, Japan was a land of mystery at the edge of civilization. Isolated at first by geography and later by choice, the Japanese developed a distinctive culture that drew very little from the outside world. At the beginning of what were the Middle Ages in Europe, the advanced culture of Japan was centered at the north end of the Inland Sea on the main island of Honshu. Across the Hakone Mountains to the east lay the Kanto, an alluvial plain that was the single largest rice-growing area on the islands. To the north and east of the Kanto was the frontier, beyond which lived aboriginal Japanese who had occupied the islands since Neolithic times.
Some believe that by the fifth century AD the Yamato court had become largely ceremonial. Independent clans, known as uji,held the real power behind the throne. Clan leaders formed a sort of aristocracy and vied with each other for effective control of land and the throne.
In 536 the Soga clan became predominant and produced the first great historical statesman, Prince Shotoku, who instituted reforms that laid the foundation of Japanese culture for generations to come. In 645, power shifted from the Soga clan to the Fujiwara clan. The Fujiwara presided over most of the Heian period (794 to 1185). The new leadership imposed the Taika Reform of 645, which attempted to redistribute the rice-growing land, establish a tax on agricultural production, and divide the country into provinces. Too much of the country remained outside imperial influence and control, however. Real power shifted to great families that rose to prominence in the rice-growing lands. Conflict among these families led to civil war and the rise of the warrior class.
Similar to the experience of medieval western Europe, the breakdown of central authority in Japan, the rise of powerful local nobles, and conflict with barbarians at the frontier combined to create a culture dominated by a warrior elite. These warriors became known as Samurai, ("those who serve"), who were roughly equivalent to the European knight. A military government replaced the nobility as the power behind the throne at the end of the twelfth century. The head of the military government was the Shogun. Samurai lived by a code of the warrior, something like the European code of chivalry. The foundation of the warrior code was loyalty to the lord. The warrior expected leadership and protection. In return he obeyed his lord's commands without question and stood ready to die on his lord's behalf. A Samurai placed great emphasis on his ancestry and strove to carry on family traditions. He behaved so as to earn praise. He was to be firm and show no cowardice. Warriors went into battle expecting and looking to die. It was felt that a warrior hoping to live would fight poorly.
The Kamakura period (1185 to 1333) was named after a region of Japan dominated by a new ruling clan that took power after civil war. The Mongols attempted to invade Japan twice, in 1274 and 1281, but were repulsed both times. A fortuitous storm caused great loss to the second Mongol invasion fleet.