This paper investigates the mediatory role played by holy shrines in navigating the relationship between Hazara Afghan refugees and the Iranian state. It focuses on the controversy around the burial of an Afghan who died fighting for Iran in the Iran-Iraq War, whose body was uncovered decades later and reburied in an elaborate ceremony at the shrine of Imam Reza. The paper contextualizes this story in the long history of sanctuaries in Iran, including that of Imam Reza which has attracted pilgrims and refugees seeking shelter for centuries. The paper approaches sanctuaries as fugitive territories. Fugitive carries two different senses here. First, it refers to spaces to which those seeking protection turn to establish a provisional yet contractual relationship and to negotiate with those in power. Second, a delimited territory with alternative saintly sovereignty that has continuously escaped from and refused to be entirely overtaken by the sovereignty of the state, challenging its legal regime of border-control, inclusion, and exclusion. This second sense, I argue, is tightly interwoven to the first one. In this paper, I show how this fugitive quality of the shrine sanctuaries as embedded exteriorities help those sent to the most precarious margins of the society, to yet avoid a relationship of total violence and exploitation and to be able to establish a negotiable bond with those holding power over their lives. Using data gathered through more than three years of ethnographic research with a community of Hazara Afghan migrants and refugees in the shrine city of Mashhad, I propose that the proper genealogy of the present-day refugee in Iran could be seen in the figure of basti, the one taking refuge at the shrines and other sites of sanctuary seeking, and that this process of mediation between refugees, and the state, performed by shrines, points to the presence of two different idioms of sovereignty for the shrine and the state.