sentences:  During the Kamakura period, under the sponsorship of Hōjō Tokimune, the temple changed from Tendai to Zen, with Rankei Dōryū has its head priest and came to a patronised by the samurai class.During the Edo period, it was rebuilt by Date Masamune from 1604 onwards using lumber brought from Mount Kumano in what is now Wakayama Prefecture and skilled workmen from Kyoto and Kii Province.The haiku poet Matsuo Bashō wrote a tribute to the golden walls inside the temple.