Matsumae clan
Hakodate flourished during the Hoei period (1704–11), and many new temples were founded in the area. The town's fortunes received a further boost in 1741 when the Matsumae clan, which had been granted nearby areas on the Oshima Peninsula as a march fief, moved its Kameda magistracy to Masamichi's house in Hakodate.