Military authorities in the feudal period occasionally staged sword hunts to disarm peasants. The most famous one was staged in 1588 by Toyotomi Hideyoshi and was a device to both pacify the nation and clearly distinguish the ruling samurai class, which could bear swords, from the rest of the population who could not. One local district is recorded as giving up nearly 1100 long swords, 1500 short ones, 500 guns and 700 knives. Toyotomi’s edict also required all samurai (the only class allowed to carry swords) to live in the castle of their lord. This led to the evolution of castle towns since the samurai required services which only merchants and artisans could provide.