[3] The Grand Matsu Temple was originally the palace of the Southern Ming prince Zhu Shugui, constructed for him near Chikan Tower by the Tungning king Zheng Jing[4] in 1664.
[5] Zhu, known as Prince Ningjing, helped Koxinga's dynasty colonize and clear farmland in the surrounding Chengtian Prefecture but, after Shi Lang's 1683 victory at Penghu, Zheng Keshuang was obliged to surrender to the Qing Empire.
[4][6] Shi Lang initially took up residence at the palace, rebuilding some areas to his liking, but then memorialized the Kangxi Emperor to convert it into a temple to Mazu,[7] the deified form of the medieval Fujianese shamaness Lin Moniang.
[7] The move served a propaganda function, with the Qing claiming to honor Mazu's "support" for their conquest of Taiwan from Tungning.
The altar of Yue Lao, the old man under the moon, is frequented by singles in search of a husband or wife.