A ninja was a covert agent or mercenary in feudal Japan. The functions of the ninja included espionage, sabotage, infiltration, assassination and guerrilla warfare. Their covert methods of waging irregular warfare were deemed dishonorable and beneath the samurai, who observed strict rules about honor and combat. The shinobi proper, a specially trained group of spies and mercenaries, appeared in the 15th century during the Sengoku period,