The medieval period, which is comprised of the Kamakura and Muromachi periods (1338–1573) was a time an intermittent warfare. After the Ōnin War (1467–1477) there was a century of civil war. A number of famous warrior tales date from this period. One of the most influential was perhaps the Heike monogatari (Tale of the Heike), which told the tale of the origins of the Kamakura shogunate. Its opening line, “The bell of Gion Temple sounds the impermanence of all things,” is one of the most famous in Japanese literature and reflects Buddhist ideas about the ephemeral world. Compiled perhaps a century after the events it relates, it is a partisan and romanticized account that has sometimes been taken as journalism. Nevertheless, as long as the circumstances of its creation are taken into account, it gives one a valuable contemporary perspective on warriors. Heike has been translated into English several times as have several other important texts (like the Taiheiki) but many more are still only available in Japanese.
Warrior tales like Heike monogatari show an evolving class consciousness, but the clear separation of the warrior from other classes is usually dated to 1588 when Toyotomi Hideyoshi (1536–1598), the then military leader, ordered all swords to be collected. He justified these actions by suggesting he needed them to build a large statue of Buddha to protect the state. This and other legislation set forth by Hideyoshi for the first time set clear barriers between the warrior and other classes. Thus, it is important to remember that samurai were a social class rather than a profession, rather like the kshatriya of northern India. Women and children who were not members of an organized fighting force in the traditional sense were members of the warrior class. However, women were often trained to fight with the naginata, a long pole arm with a curved blade of about six to eight inches.
The elite warrior of the stereotype is equipped with a special code that supposedly defined them. This set of laws is labeled bushidō, literally the way of the warrior. Bushidō in the sense of a code for elite warriors, is like all stereotypes, based on a kernel of truth. There were certainly a loose set of practices and customs associated with the warrior class. However, the word bushidō does not exist before the seventeenth century. Discussion about these practices and customs of the warrior class was represented by a number of other words, like yumiya no michi (way of the archer) and musha no narai (warriors’ learning), suggest that there was some attention devoted to proper behavior. Additionally, individual houses issued their own codes (kakun) but only a few of these exist and those that do were not widely circulated. Most often, they were handed down by elite patriarchs to their sons. Nevertheless, the word bushidō does not appear in any datable writings until the seventeenth century and not all that frequently for hundreds of years thereafter.