The ancestor of the Nagatani family was a local clan in Nukazuka Village in Ujitawara and moved to Yuyatani in 1592 and while he was engaged in farming, worshipped the Yuyama-sha Shrine.
永谷家の先祖は同じ宇治田原の糠塚村の土豪で、文禄元年（1592年）に湯屋谷に移り住んで農業に携わる一方、湯山社を祀っていた。