The first Japanese armies were largely made up of peasant slaves who were forced to serve. This system of requiring the peasants to serve in the military was abandoned in 792 AD. Shortly afterwards, a government attempt to establish military units failed. Before long, due to civil unrest, the wealthiest aristocrats were force to hire professional soldiers. At the same time, provincial government administration fell into the hands of the highest bidder. These men, self-made aristocrats, used their private armies to collect taxes and enforce the laws. Sometimes these private armies met in battle when differences couldn't be resolved.
The ascent of the samurai warrior to the top of Japanese society was a slow process. It was the increase in provincial power during the Heian period (794-1185) that made it possible for the samurai to reach out for political power and change the system of government itself. In 935 AD, a private army led by Taira no Masakado conquered 8 Kanto provinces. Shortly afterward he declared himself emperor. Taira claimed to be direct descendant of Emperor Kammu. Today, Japanese historians refer to Taira no Masakado as the very first samurai, and he is celebrated as a national hero.
In the 12th century, the Kyoto government aristocrats employed samurai on their estates. These aristocrats or daiymo were not interested in administering their large landholdings. Largely absent, they turned the day to day management and defense of these lands to the samurai. In return, the samurai kept the peace, and enforced the laws of the land. It didn't take long before these administrator warriors became invaluable. Gradually over time, the Kyoto aristocratic government declined, and as it declined the samurai warriors rose to the top of Japanese feudal society. From 1185 AD to the Edo period in 1868, the samurai dominated politics and military affairs.
The ancient samurai carried two swords. The long one was for fencing and the short one was for decapitating the victim or committing suicide. The samurai were easily identifiable because they shaved the brow and the dome of their heads, and they wore their thick black hair tied back in a top-knot. If they were insulted they had a right to protect themselves by executing the one who insulted them. They followed a code of ethics called the Bushido, or the “Way of the Warrior.”
Samurai were encouraged to pursue their artistic passions by painting. They were also encouraged to be literate. Under the Bushido, warriors were expected to be self-disciplined, courageous, loyal, obedient, and frugal. They were encourage to adopt Confucian values and Zen Buddhism. Samurai had a reciprocal relationship with the lord that they served. Their services to their lord were absolute and unconditional. In return, they were paid. Sometimes the pay came in rice and sometimes in labor. They were usually not very religious, but instead focused on loyalty, service, and honor. Samurai warriors lived everyday like it was their last. They comprised approximately 5% of the total population of Japan. Today, Bushido still serves as the basis for the code of conduct for the Japanese.