The palace was built during the reign of Emperor Yongzheng of the Qing dynasty and has stood for nearly three hundred years, bearing a long history. In the ninth year of Yongzheng, a violent uprising broke out in the western part of Jia, and the local official Pan Dunjia, together with his sons Shiwan, Shi Xing, and the official Zhang Dajing, led the local militia to quell the rebellion. Their successful suppression earned them great credit. In the eleventh year of Yongzheng, Zhang Dajing, along with Shiwan and Shi Xing, went to the capital to receive an award and was bestowed with a serpent robe (now preserved by the Zhang family). Upon returning to Taiwan, they were moved by the blessings of the Sacred Mother and so they specifically visited the Tianhou Palace at Meizhou to respectfully request the celestial presence of the Sacred Mother. The shrine was then dedicated at the south‑siding of the San‑Gong Temple (known as “瓦磘腳” because the construction of the temple required specially fired glazed tiles and bricks, so it was called “瓦磘腳”). Later, due to unsuitable geography, the shrine was moved to its current location. The origin of Wanheng Palace is said to be named after Shiwan and Shi Xing; the former entrance of the San‑Gong Temple was once known as the “Aili Great Amnesty Exit.” After Han settlers farmed the area, they called it “Wanheng Village,” which gave the palace its name.
Image and text source: Wanheng Palace, San‑Gong Temple Entrance, Taichung.