Sainenji was founded by Hattori Masanari, a legendary ninja. It is a temple built to commemorate honourable Nobuyasu Matsudaira, Tokugawa Ieyasu’s eldest son.

Hattori Masanari was born in Mikawa Province (former Aichi Prefecture) in Tenmon 11 (1542) as a child of the ninja “Hanzo Yasunaga the First”. Yazunaga was a leader of a ninja group and Masanari served Ieyasu Tokugawa as a samurai. Masanari was a master of spears and he had the nickname of “Oni no Hanzo (Demon Hanzo)” and was given a spear by Ieyasu as a gift. This spear became the temple’s treasure and it was registered as one of the designated cultural properties of Shinjuku.

Masanari shaved his hair to enter the Buddhist priesthood and changed his name to “Sainen”. His Buddhist name is “専称院殿(Senshoinden) 安譽(Anyo) 西念 (Sainen) 大禅定門 (Daizenjomon)”. When the temple was built in his name, and the temple’s name including prefixes was after his Buddhist name, 専称山(Sensho-san) 安養院(Anyo-in) 西念寺(Sainen-ji).