The surname rotation system is the most significant feature of the Ghost Festival in Keelung. Regarding its origin, the consensus belief explains that because of the feuds between the settles from Zhangzhou and Quanzhou in the Xiangfeng era were very serious that local gentry proposed the surname rotation system, rotated the duty of running the festival among the clan organizations based on consanguinity, to resolve the confrontation rooted on regional feuds; they would compete in grand parades instead of fighting.
In the past, both the sources of relevant historical documents and supporting arguments of this theory were not well attended and valued; status of the strength and presence of competence of on-duty clan organizations at that time were not clearly rectified; meanwhile, this festival activities during the Qing Dynasty and Japanese colonial rule were not only limited to Zhu-pu (Main Salvation, 主普), there were also Zhu-hui (Main Assembly, 主會), Zhu-jiao (Main Ritual, 主醮) and Zhu-tan (Main Alter, 主壇). How did these four parts proceed and operate? How did the human connections intermingled behind the scenes? Though these issues have been discussed in the past, upon further examination, they deserve further study.
This research proves that the surname rotation system started in the 5(superscript th) year of Xianfen was indeed rooted on the feuds between the settlers from Zhangzhou and Quanzhou, but the feuds should occur more than one time during the Xianfeng era. And the Small Sword Society rebellion in Fujian triggered fighting in Keelung. These incidents caused heavy casualties in Keelung, therefore, local gentry used the surname rotation system to release souls from purgatory, so the people could live in ease. During Taiwan's Colonial period, this festival transformed to an annual event of competition of main salvation alter, lantern-decorated vehicle in parade and live stock sacrifice among various clan organizations. In order to fully explore its strength, every clan organization mobilized its members in the region, and this promoted the new communal (which include Jinbaoli, Keelung, San Diego, Shrding) attachment and faded native place attachment (Zhangzhou, Quanzhou). In the meantime, clan organizations not included in the surname rotation system rose and aggressively developed their strength to compete with the eleven-clan organizations in the system; the other four of them managed to secure the opportunity to join the surname rotation system after World War Ⅱ. Therefore, there are fifteen clan organizations in the surname rotation system today.