Bushido was a code of conduct for samurai warriors, equivalent to the code of chivalry in medieval Europe.
Although its origins date back to the 9th century, it was only formalized in writing in the 17th century within the Japanese feudal law during the Edo period. It was during this century that the word "Bushido" first appeared in Japanese literature.
Literally translated as "way of the warrior", it may be interpreted as preservation of peace by force.
It contained influences of Shintoism, Confucianism and Buddhism:
The cult of loyalty until death to the damyo (feudal lord), to the shogun, patriotism and reverence to ancestors (Shintoism).
Duties and moral relations between father and son, master and servant (Confucianism).
Stoicism, appreciation of danger and death, contempt of desire as the cause of suffering (Zen Buddhism).
Seppuku is a feature of Bushido, practiced by the samurai when he failed to defend his honor. It was a ritual suicide committed by slashing the abdomen with a sword.
The samurai had to lead an honorable life without excesses and had to
protect the weak. There were 7 virtues encoded in Bushido:
Bushido inspired nationalist movements and the kamikazes during World War II and today it also marks its presence in the social and economic organization of Japan (where workers have a strong sense of loyalty towards their employers).