The palace of Tianhou is also called the palace of Tianfei. It was built in the 2nd year of the reign of Qingyuan (1196). The government often held ceremony of sacrifice to the sea for ocean-going commercial vessels. Ma Zu, named Lin Moniang, is a female civilian on Meizhou Island in the North Song Dynasty. It is said that when she was born, there were a room of fragrance and a splash of auspicious light. For her whole life, she did good deeds and relieved distress among the poor and guide villagers to dodge from evil and tend to good. She sacrificed her life to save her father whose boat came across a storm. The common people recalled her with deep emotion for her virtues and respected her as a maritime goddess. They also built temple and sacrifice to her. Local fishermen would offer a sacrifice in front of the Tianhou Palace before they went to sea.