The remains of the patron saint were later moved to Taiwan by Cheng Cheng-kung, better known in the West as Koxinga, and a new temple was built to honor him.
明末鄭成功率眾來台，福建安溪的祖師神像也隨之東渡，因為它顯赫靈驗，成為三峽人的精神保壘。三峽的祖師廟，曾三度重建。