According to some historians, the first samurai appeared around 10th century Japan during the Heian period. These warriors served the kings of Japan and protected them by using their swords against enemies who had been sent by the king to kill him. The role of the samurai changed over time as the country transitioned from being a monarchy to a democracy. Today, they are often associated with Edo-period Japan (1603-1867).