Ninja were professional spies during the age of the samurai. Their origins go back to the twelfth century, when the samurai class began to gain power. When the scale of fighting increased in the fourteenth century, it became necessary to conduct espionage activities against enemy forces, and ninja became even more active.
Ninja were called upon by their feudal lords to gather information, plunder the enemy's food and weapon supplies, and lead the way in nighttime attacks. They received specialized training and were given special duties. Ninja remained active until the beginning of the Edo period (1603-1868), when social order was restored by the government in Edo (now Tokyo).
It was from the latter half of the eighteenth century that ninja became popular subjects of books and dramas. In the twentieth century ninja have been depicted in films using special effects and comics as imaginary characters with superhuman powers.
Recently ninja have become popular in the United States and other countries through comics and films, such as Teenage Mutant Ninja Turtles. Ninja are also popular as cartoon characters among Japanese children.