The samurai were members of the military class in feudal Japan. They followed the code of Bushido which stressed loyalty, self-discipline, and honorable behavior. Samurai used various weapons but were especially known for their swords. They were expected to commit seppuku or ritual suicide to avoid dishonorable death or capture. Over time the samurai class grew in influence and power, establishing a new government and social hierarchy with the samurai at the top during several historical periods, until ultimately being abolished in the late Edo period.