The coastal village of Baishatun was first inhabited during the reign of Qianlong Emperor, where a rudimentary temple was built here to pray for the safety of fishermen. Towards the end of Xianfeng Emperor's reign, local residents donated money to build a larger temple made of brick, which was completed in 1863 (Tongzhi 2); this temple was named Gongtian Temple. Later, the temple was renovated twice, in 1936 and 1990, into the reinforced concrete structure today.
