There are three things which I cannot control, the fall of the dice, the flow of the River Kamo, and the turbulent monks of Mount Hiei.— Emperor Go-Shirakawa
By the eighth century, the Japanese state had developed to the point of establishing a permanent capital at Nara. Unfortunately, at the same time, the power of the Buddhist monasteries was getting out of control. One Nara temple alone possessed forty-six manors and 5000 acres of excellent farmland, all of it tax-free. As we have seen, peasants often commended their lands to the monasteries in order to avoid government taxes. When a Buddhist monk, Dokyo, exercised undue influence over the empress Koken, this triggered a reaction against women running the government that reduced their overall status in society. It also caused the next emperor, Kammu, to move the capital away from the monasteries. Following the example of the T'ang dynasty then at the peak of its power in China, he founded a new capital at Heiankyo, meaning "Capital of Eternal Tranquility". The new city, modeled after the T'ang Chinese capital, Ch'ang-an, but on a smaller scale, was laid out in a rectangular grid facing South with the palace at the north end.
Since Japan was isolated and faced no foreign invasions at this time, Heiankyo had few fortifications and was little concerned with military affairs. It was able to maintain control over most of Japan through peaceful means. However, thanks to the non-military character of the government, two elements of Japanese society were creating problems that eventually would weaken Heiankyo’s control. First of all, the power and rivalries of the different Buddhist monasteries often got out of control. These monasteries went so far as to form their own armies that fought each other and disrupted the public peace. Another source of trouble came from the Ainu on the frontiers. Japanese settlers and nobles claiming new lands had to spend much of their time fighting these primeval inhabitants. As a result, these frontier settlers became both tough fighters (ancestors of the Samurai) and increasingly independent.
For the time being, however, a powerful landed family, the Fujiwara, was able to maintain effective control over both the countryside and the emperors, through whom they ruled. They used the power that came from their extensive landed estates and exercised a skillful diplomacy of playing one faction off against another to control the nobles in the countryside. Their influence over the emperors and the government came from their ability to marry their daughters into the imperial family. By this time, the emperors were also so burdened by their ritual duties that it was increasingly difficult for them to exercise real power. Thus the custom of indirect rule, a dominant feature of Japanese history, became firmly entrenched during several centuries of Fujiwara influence.
Thanks to the peace and security provided by the Fujiwara, a handful of idle nobles in Heiankyo were able to participate in the brilliant, if somewhat artificial and inbred, culture that court life offered. Much like the French nobles at Louis XIV's court at Versailles, these nobles engaged in activities where manners, taste, and fashion counted for more in gaining status than did accomplishing anything more substantial. Careers rose and fell on the basis of the choice of colors for clothes and stationary or the proper phrasing in a poem. Long hair, blackened teeth, and eyebrows that were shaved and repainted higher on the forehead were the marks of beauty for women. A continuous round of love affairs, cuckoo viewing expeditions, and winding water banquets, where men would drink from floating cups of wine and then compose poems, occupied their time.
Our best source for getting the flavor of this court life comes from the pen of a woman, Lady Murasaki, who wrote one of the greatest works of Japanese literature, The Tale of Genji, whose title character spends his life in search of true love. Interestingly, women at court tended to write the best literature since, unlike men who had to concern themselves with the precise calligraphy of the difficult Chinese writing system, they could use the more phonetic Kana script. As artificial as much of court life at Heiankyo may have been, it did have a profound effect on later Japanese tastes in such things as art and poetry.
Whatever the later influences of this court culture, it also had several factors working against its continued existence. For one thing, it was cut off from the realities of mainstream society and its powerbase in the countryside. Also, the Taika reforms and Taiho Law Code were meeting with growing resistance from both nobles and peasants. Along these lines, the peasants' practice of commending their lands to local nobles and monasteries to avoid government taxes seriously cut into government revenues. As a result, the central government's power and the influence of the Fujiwara family declined. This led to the rising power of the provincial warlords, which further accelerated the decline of the government, and so on. The resulting turmoil triggered a civil war between the two most powerful noble clans, the Taira and Minamoto, both of whom were originally minor offshoots of the imperial family who had gone to the provinces to make their fortunes. In the end, the Minamoto, who had the backing of the shadowy emperors in Heiankyo, won the civil war and the title of Seii-tai-shogun, meaning "barbarian suppressing generalissimo". The shortened version of this title, shogun, would be the one that most effective rulers of Japan would carry until 1868, ruling indirectly through the emperors who still carried on as ceremonial figureheads.
As the term shogun suggests, the Kamakura Shogunate that the Minamoto established was in essence a form of military rule. This contrasted sharply with the highly cultured but non-military regime that preceded it in Heiankyo, and was referred to as the bakufu ("tent government"), to reflect this military nature. Gradually, the shoguns replaced the formal government centered in Heiankyo with a strongly run feudal administration that rewarded their followers with income from estates and offices in the provinces. In 1221, a retired emperor who was resentful of this erosion of the central government's power rebelled in what was known as the Shokyu War. He was easily defeated, which allowed the shoguns to extend their feudal government all across Japan.
Feudal rule in Japan was very similar to its counterpart in Western Europe at the time. This was especially true of the warrior class that served as the backbone of the feudal order, known as the bushi ("warriors") or samurai ("those who serve"). Much like the European knights who were descended mainly from the Germanic invaders who had overthrown the Roman Empire, the samurai were largely descendants of the old provincial uji aristocracy, each group inheriting its military traditions from its respective ancestors. Both groups were an elite aristocracy, since the arms and armor needed to fight were too expensive for most people. Both groups also fought primarily from horseback in a series of individual encounters that often required the exchange of courtesies that befitted warriors of an elite class. Opposing samurai would greet each other with their respective genealogies to ensure they had worthy opponents, compliment their defeated opponents' courage afterwards, and even burn incense in their helmets so their heads would smell good if they were decapitated, a common practice in samurai combat, largely for the purpose of proving one’s victory.
The Samurai code of honor, later known as the Bushido ("Way of the Warrior"), demanded selfless loyalty to one's lord. Much like in Western Europe, the lord-vassal relationship was a reciprocal one, where the lord gave his vassal protection and income from land or an office in return for lifelong service. However, in times of turmoil when the law of the jungle prevailed, many samurai would quickly change loyalties according to the shifting fortunes of war and politics. Samurai were also expected to display unflinching bravery in combat and bear incredible hardships without so much as complaining. Even to feel pain and hunger, let alone show or express it was considered a dishonor. Such values tended to breed a certain callousness for human suffering and disregard for human life which later shocked Westerners first coming into contact with Japan.
Many of the same virtues were expected of samurai women, who were taught to repress their feelings, ignore suffering, loyally serve their husbands, and in some cases to handle weapons. Women handled household affairs, including money, which was considered beneath a warrior's dignity. Even today, Japanese women typically handle family finances, probably deriving from this custom. At first, a samurai woman could inherit her husband's property and take charge of her family affairs and deceased husbands' duties to his lord. But, as time went on and warfare became more chronic, women's property rights declined and they found themselves condemned to an increasingly inferior position in society.
Japanese arms, armor, and techniques of combat were quite different from their counterparts in Western Europe. Instead of using the lance as their primary weapon, as European knights did, the samurai relied primarily on the bow and splendid curved swords, probably the finest crafted blades anywhere. As a result, the samurai's sword became the material focus of his honor, and a whole tradition and mythology grew up around both Japanese sword making and their swords. In contrast to the heavy plate armor which evolved in Western Europe, samurai armor was made up of thin strips of steel held together by brightly colored threads, making it much lighter and more flexible, while still providing a good deal of protection.
The strong rule established by Minamoto Yoritomo continued under his widow, Masa-ko, and her father, Hojo Tokimasa (1138-1215). Afterwards, the Hojo clan established a regency (1205-1333) that controlled the shoguns who in turn were supposedly running Japan in the name of the emperors. The Hojo Regency ruled Japan with a firm and somewhat just hand. In 1232, it established a guideline for jurists known as the Joei Code. Magistrates were expected to find and carefully weigh evidence in trials. (If that failed, they would then look for some evil omens, such as nosebleeds, choking, or being wet by a crow or a kite to determine the case.) Society was divided into three classes (samurai, commoners, and slaves), but did not always give the upper classes better treatment. Women's status was also relatively high. They inherited land, administered offices, and even led troops into battle. One of them, Masa-ko who was Minamoto Yoritomo's widow, was a power behind the throne after her husband's death.
The Hojo Regency saw two problems arise that would bring about their eventual fall. First of all, the peace and prosperity it brought encouraged the rise of a middle class. Although the samurai looked with disdain upon people so concerned with money, prosperous times did influence them to imitate the more elegant and expensive lifestyles carried on at court. At the same time, the rising money economy triggered rising prices. As in Western Europe, this inflation hurt the samurai, especially the poorer ones who were on fixed incomes from lands and offices and were also not very good at handling money. As a result, many of the lower ranks of samurai found themselves in difficulties, some of them becoming unattached and footloose bandit samurai known as ronin who would add to Japan's troubles in the future.
The second problem came in 1274 when the Mongol ruler of China, Kublai Khan, launched his first invasion of Japan. Although this was driven back by a typhoon, the Mongols returned in 1281 with a much larger force of some 140,000 men. Despite the Mongols' numbers and use of such weapons as catapults that fired explosive projectiles, the samurai fought furiously to repel the invaders. However, once again, it was the force of nature in the form of a typhoon that decided the issue by wrecking much of the Mongol fleet and saving Japan. The Japanese called these typhoons kamikaze ("divine winds"), feeling that Japan was specially protected by the gods. The Mongol invasions forced the Japanese to band together as never before in the common defense of their nation.
However, the cost of driving out the Mongols had been a tremendous burden for the Hojo government. It also led many samurai to expect rewards from the government for their efforts. Unfortunately, since the Hojos had gained no new lands or plunder from these wars and could not meet samurai expectations of rewards, they lost many of their followers' support. Therefore, because of both economic strains and dissatisfaction among many samurai, the Hojo Regency and Kamakura Shogunate gave way to the weak rule of the Ashikaga Shogunate (1338-1573). The government's weakness allowed local lords, known as daimyo, to assert their independence. Eventually, Japan was split into some 60 virtually independent states whose daimyos disrupted the public peace with their private wars.