Several years later in 1299, the temple was relocated to the site of Minister of the Left MINAMOTO no Toru's residence (Rokujo Kawarain) in Rokujo Higashinotoin (present-day Shimogyo-ku Ward, Kyoto City) due to the patronage of Kanpaku (chief advisor to the emperor) Tadanori KUJO, and merged with the Tenman-gu Shrine and Kanki-ji Temple of the jingu-ji Temple (temples associated with shrines) at the former residence (in present-day Horimatsu-cho, Kamigyo-ku Ward, Kyoto City) of SUGAWARA no Koreyoshi (the father of SUGAWARA no Michizane).
それから数年後の正安元年（1299年）、寺は関白九条忠教の庇護のもと、六条東洞院（現・京都市下京区）の源融（みなもとのとおる）左大臣の旧跡（六条河原院）へ寺地を移すとともに、菅原是善（菅原道真の父）の旧邸（現・京都市上京区堀松町）の天満宮とその神宮寺である歓喜寺を合併した。