What has become a lasting legend of Japanese loyalty and revenge -- and the basis for a number of films and books -- is rooted in historic fact.
In the Edo period of Japan, samurai served largely as military advisors, landowners and bodyguards for wealthy noblemen. The samurai's oath of loyalty included an agreement between a samurai and his daimyo (nobleman) to avenge his master's death. The 47 samurai sworn to protect their master, Asano Naganori, took this oath seriously.
During a 1701 visit to Tokyo (then known as Edo), Naganori slashed at another nobleman, Kira Yoshinaka, the result of an unknown dispute between the two. For his transgression, the ruling group decided that Naganori should commit seppuku, or ritual suicide, which he did later that day.
Naganori's men lied in wait and planned. Two years later, the 47 ronin (the term for a samurai who lacks a master) crept into the Yoshinaka's home and confronted him, telling him why they had come and offering him the chance to commit seppuku himself. When he didn't, the ronin removed his head, carried it to the castle where their master was buried and placed it in front of his tomb. They surrendered to authorities, who ordered the ronin to commit suicide. Forty-six of the 47 ronin committed seppuku. There are conflicting stories of the fate of the 47th ronin; he either died or was pardoned.