Imamiya is a large shrine complex that was built at its present site in 1001, though established a few years earlier on top of nearby Funaoka Hill. The shrine was established to ward off one of the plagues that periodicly attacked the area. There are many sub-shrines within the grounds, but the 3 main kami are Okuninushi (sometimes called Onamuchi, sometimes Daikokuten), Kotoshironushi, and Inadahime. What is interesting is that these are all Izumo kami. Okuninushi was the Izumo leader who "gave" Japan to Amaterasu's descendants, Kotoshironushi is the Izumo version of Ebisu. There are three distinct versions of Ebisu, one for central Japan, one for northern japan, and one for western Japan. Usually in the Kyoto area they refer to Ebisu as the child of Izanami and Izanagi and hailing from nearby Awajima. Inada is the Izumo "princess" who married Susano after his defeat of the serpent Yamata no Orochi.
The architectural style of the main shrine buildings and impressive gate are 17th Century, but were reconstructed in the early 20th century.
There had earlier been a ceremony at one of the sub-shrines (Munakata-sha, I think), and the offerings (sake and various foods, sakaki branches) were still on the altar.
The area around Imamiya has a nice old atmosphere, and its not surprising that many "Samurai" dramas are filmed here. Heading south from the shrine I spied this wonderful old wall built using roof tiles.