Following the fight of Hakusukinoe against Tang China and Silla in 663 AD, which led to a retreat from Korean affairs, Japan underwent extensive reform. One of the most important was that of the Taika Reform, issued by Prince Naka no O,e Emperor Tenji in 646 AD. This edict allowed the Japanese aristocracy to adopt the Tang dynasty political structure, bureaucracy, culture, religion, and philosophy.3 As part of the Taiho, Code of 702 AD, and the afterward Yo,ro, Code,4 the population was obliged to report on a regular basis for census, a precursor for national conscription. With an understanding of how the population was circulated, Emperor Monmu presented a law whereby one in 34 adult males has been drafted into the national military. These soldiers were obliged to supply their own weapons, and in return were exempted from duties and taxes.3 This was one of the 1st tries by the Imperial government to form an organized army modeled after the Chinese system. It has been called "Gundan Sei" ja:?,?,?, by afterward historians and is believed to have been short lived.
The Taiho, Code classified most of the Imperial bureaucrats into twelve ranks, each divided into two sub ranks, first rank being the highest adviser to the Emperor. Those of sixth rank and below were called "samurai" and dealt with day to day affairs. though these "samurai" were civilian public servants, the modern word is believedby whom? to have resulting from this term. Military men, but, could not be called "samurai" for many more centuries.
First the Emperor and non warrior nobility employed these warrior nobles. In time, they amassed enough manpower, resources and political backing in the form of alliances with one another, to set up the 1st samurai dominated government. As the power of these regional clans grew, their chief was usually a remote relative of the Emperor and a lesser member of either the Fujiwara, Minamoto, or Taira clans. although first sent to provincial regions for a fixed four year term as a magistrate, the toryo fell to return to the capital when their terms ended, and their sons hereditary their positions and continued to lead the clans in putting down rebellions during Japan throughout the middle and later Heian period. Because of their increasing military and economic power, the warriors finally became a new force in the politics of the Imperial court. Their involvement in the Ho,gen Rebellion in the late Heian period consolidated their power, which afterward pitted the rivalry of Minamoto and Taira clans against each other in the Heiji Rebellion of 1160.
The victor, Taira no Kiyomori, became an imperial consultant, and was the 1st warrior to attain such a position. He sooner or later seized control of the central government
, establishing the 1st samurai dominated government and relegating the Emperor to figurehead position. but, the Taira clan was still conservative when in comparison to its eventual replacement, the Minamoto, and instead of expanding or strengthening its military may, the clan had its women marry Emperors and exercise control through the Emperor.
The Taira and the Minamoto clashed again in 1180, beginning the Genpei War, which ended in 1185. Samurai fought at the naval fight of Dan no ura, at the Shimonoseki Strait which separates Honshu and Kyushu in 1185. The victorious Minamoto no Yoritomo established the superiority of the samurai over the aristocracy. In 1190 he visited Kyoto and in 1192 became Sei'i taisho,gun, establishing the Kamakura Shogunate, or Kamakura Bakufu. Instead of decision from Kyoto, he set up the Shogunate in Kamakura, near his base of power. "Bakufu" means "tent government", taken from the encampments the soldiers could live in, in accordance with the Bakufu's position as a military government.
After the Genpei war, Yoritomo acquired the entitlement to appoint shugo and jito,, and has been allowed to manage soldiers and police, and to gather some amount of tax. firstly, their responsibility was constrained to arresting rebels and collecting needed army provisions, and they were forbidden from interfering with Kokushi officials, but their responsibility slowly extended. , the samurai class appeared as the political decision power in Japan.
In 1592, and again in 1597, Toyotomi Hideyoshi, aiming to attack China ?,?,?, through Korea, mobilized an army of 160,000 peasants and samurai and deployed them to Korea. See Hideyoshi's invasions of Korea, Cho,sen seibatsu ?,?,?,?,? . Taking benefit of arquebus mastery and broad wartime experience from the Sengoku period, Japanese samurai armies made big gains in most of Korea. Kato, Kiyomasa advanced to Orangkai territory present day Manchuria bordering Korea to the northeast and crossed the border into Manchuria, but withdrew after retaliatory attacks from the Jurchens there, as it was clear he had outpaced the rest of the Japanese invasion force. some of the more famous samurai generals of this war were Kato, Kiyomasa, Konishi Yukinaga, and Shimazu Yoshihiro. Shimazu Yoshihiro led some 7,000 samurai and, in spite of being heavily outnumbered, defeated a host of allied Ming and Korean forces at the fight of Sacheon in 1598, near the conclusion of the campaigns. Yoshihiro has been feared as Oni Shimazu "Shimazu ogre" and his nickname spread across not only Korea but to Ming Dynasty China. In spite of the superiority of Japanese land forces, finally the two expeditions failed although they did devastate the Korean landmass from factors like Korean naval superiority which, led by Admiral Yi Sun sin, harassed Japanese supply lines continuously during the wars, ensuing in supply shortages on land , the commitment of sizeable Ming forces to Korea, Korean guerrilla actions, the underestimation of resistance by Japanese commanders in the 1st campaign of 1592, Korean defenses on land were caught unprepared, under trained, and under armed, they were quickly overrun, with only a restricted number of effectively tolerant engagements against the more experienced and battle hardened Japanese forces in the second campaign of 1597, Korean and Ming forces proved to be a far more hard challenge and, with the backing of continued Korean naval superiority, restricted Japanese gains to parts southeastern Korea , and wavering Japanese commitment to the campaigns as the wars dragged on. The last death blow to the Japanese campaigns in Korea came with Hideyoshi's death in late 1598 and the recall of all Japanese forces in Korea by the Council of Five Elders established by Hideyoshi to supervise the transition from his regency to that of his son Hideyori .