Imamiya Shrine was founded during the Heian period in 994. In 1001, however, the shrine was moved to its present-day location as a response to an epidemic that had hit the Kyoto area a year earlier. Current iterations of many of the structures were rebuilt in 1902. The shrine's festival, Yasurai Matsuri, was also created as a response to the epidemic. Through music and dance, the festival attempts to appease petrels around Kyoto with cherry blossom petals in their beaks, which were then believed to be spreading disease.
