This article examines the origins of Onsenji, a temple at the Arima hot springs, together with a set of closely related tales of other sites of curative bathing where eligious exemplars encounter Buddhist deities of healing, to explore the narrative and doctrinal patterns of the engi genre. It suggests how a com-mon literary trope, of deities who appear as lepers to test the compassion and perception of their followers, serves the institutional priorities of particular local sites and how the contents of these tales articulate Buddhist claims about pollution and purity, ignorance and insight, and sickness and salvation. It argues that the soteriology of these stories, in which mental defilements are shown to be the origin and engine of all human uffering, express in narrative form the meaning of the term engi as a Buddhist technical term for the theory of dependent origination.