The man who would later become the first of the Ashikaga shōguns, Ashikaga Takauji, was given by Emperor Go-Daigo the order to build a new temple, today's Hōkai-ji, in a certain spot in Komachi, move there the remains of the clan and make it the new Hōjō funeral temple. (
Tōshō-ji was  rebuilt where it used to stand.)
That particular area was chosen because it had been until 1333 the Hōjō clan's Komachi residence.
Later, because the locals claimed that the neighborhood was still haunted by Hōjō ghosts, a shrine called Tokusō Gongen was erected within the temple to placate them.
The shrine still stands next to Hōkai-ji's main hall.

The stele at the temple's entrance (see photo on the left) reads:
This is where the Komachi residence of the Hōjō clan used to stand.
Starting from [second regent] Hōjō Yoshitoki, the regents usually lived here. [
Last regent] Hōjō Takatoki would party here day and night and sometimes would, together with the other vassals, toss a dengaku performer a mountain of hitatare (a type of garment) and hakama as a reward.
The mansion was destroyed by fire during Nitta Yoshisada's invasion of Kamakura in 1333.
Today's Hōkai-ji was built here in 1335 by Ashikaga Takauji.
This temple was built here as the Hōjō's funeral temple to soothe the resentment of Takatoki and his clan, who had previously been enshrined at Tōshō-ji.

After the failure of Emperor Go-Daigo's Kenmu Restoration and his consequent fall from power, Hōkai-ji came under the protection of Ashikaga Takauji himself.
 The temple's shichidō garan was finally completed around 1353.
The temple was completely destroyed by fire in 1538.
At the beginning of the Edo period, Tenkai, founder of Kan'ei-ji, asked shogun Tokugawa Ieyasu if the temple could be supported and maintained by the state.
The man who would later become the first of the Ashikaga shōguns, Ashikaga Takauji, was given by Emperor Go-Daigo the order to build a new temple, today's Hōkai-ji, in a certain spot in Komachi, move there the remains of the clan and make it the new Hōjō funeral temple. (Tōshō-ji was  rebuilt where it used to stand.) That particular area was chosen because it had been until 1333 the Hōjō clan's Komachi residence. Later, because the locals claimed that the neighborhood was still haunted by Hōjō ghosts, a shrine called Tokusō Gongen was erected within the temple to placate them. The shrine still stands next to Hōkai-ji's main hall.
The stele at the temple's entrance (see photo on the left) reads:
This is where the Komachi residence of the Hōjō clan used to stand. Starting from [second regent] Hōjō Yoshitoki, the regents usually lived here. [Last regent] Hōjō Takatoki would party here day and night and sometimes would, together with the other vassals, toss a dengaku performer a mountain of hitatare (a type of garment) and hakama as a reward. The mansion was destroyed by fire during Nitta Yoshisada's invasion of Kamakura in 1333. Today's Hōkai-ji was built here in 1335 by Ashikaga Takauji. This temple was built here as the Hōjō's funeral temple to soothe the resentment of Takatoki and his clan, who had previously been enshrined at Tōshō-ji. 
After the failure of Emperor Go-Daigo's Kenmu Restoration and his consequent fall from power, Hōkai-ji came under the protection of Ashikaga Takauji himself.  The temple's shichidō garan was finally completed around 1353. The temple was completely destroyed by fire in 1538. At the beginning of the Edo period, Tenkai, founder of Kan'ei-ji, asked shogun Tokugawa Ieyasu if the temple could be supported and maintained by the state.
Hōkai-ji (Kamakura)