In the year 710, the first permanent Japanese capital was established in Nara, a city modelled after the Chinese capital. Large Buddhist monasteries were built in the new capital. The monasteries quickly gained such strong political influence that, in order to protect the position of the emperor and central government, the capital was moved to Nagaoka in 784, and finally to Heian (Kyoto) in 794 where it would remain for over one thousand years.

One characteristic of the Nara and Heian periods is a gradual decline of Chinese influence which, nevertheless, remained strong. Many of the imported ideas were gradually "Japanized". In order to meet particular Japanese needs, several governmental offices were established in addition to the government system which was copied after the Chinese model, for example. In the arts too, native Japanese movements became increasingly popular. The development of the Kana syllables made the creation of actual Japanese literature possible. Several new Buddhist sects that were imported from China during the Heian period, were also "Japanized".

Among the worst failures of the Taika reforms were the land and taxation reforms: High taxes resulted in the impoverishment of many farmers who then had to sell their properties and became tenants of larger land owners. Furthermore, many aristocrats and the Buddhist monasteries succeeded in achieving tax immunity. As a result, the state income decreased, and over the centuries, the political power steadily shifted from the central government to the large independent land owners.

The Fujiwara family controlled the political scene of the Heian period over several centuries through strategic intermarriages with the imperial family and by occupying all the important political offices in Kyoto and the major provinces. The power of the clan reached its peak with Fujiwara Michinaga in the year 1016. After Michinaga, however, the ability of the Fujiwara leaders began to decline, and public order could not be maintained. Many land owners hired samurai for the protection of their properties. That is how the military class became more and more influential, especially in Eastern Japan.

The Fujiwara supremacy came to an end in 1068 when the new emperor Go-Sanjo was determined to rule the country by himself, and the Fujiwara failed to control him. In the year 1086 Go-Sanjo abdicated but continued to rule from behind the political stage. This new form of government was called Insei government. Insei emperors exerted political power from 1086 until 1156 when Taira Kiyomori became the new leader of Japan.

In the 12th century, two military families with aristocratic backgrounds gained much power: the Minamoto (or Genji) and Taira (or Heike) families. The Taira replaced many Fujiwara nobles in important offices while the Minamoto gained military experience by bringing parts of Northern Honshu under Japanese control in the Early Nine Years War (1050 - 1059) and the Later Three Years war (1083 - 1087).

After the Heiji Rising (1159), a struggle for power between the two families, Taira Kiyomori evolved as the leader of Japan and ruled the country from 1168 to 1178 through the emperor. The major threats with which he was confronted were not only the rivalling Minamoto but also the increasingly militant Buddhist monasteries which frequently led wars between each other and disturbed public order.

After Kiyomori's death, the Taira and Minamoto clans fought a deciding war for supremacy, the Gempei War, which lasted from 1180 to 1185. By the end of the war, the Minamoto were able to put an end to Taira supremacy, and Minamoto Yoritomo succeeded as the leader of Japan. After eliminating all of his potential and acute enemies, including close family members, he was appointed Shogun (highest military officer) and established a new government in his home city Kamakura.