Pinyin: Liú Rènguāng) succeeded Hiew Siew (Chinese: 丘秀) to become the second Kapitan Cina of Kuala Lumpur, a position not only of leadership within the Chinese community, but also of liaison with the Malay political system and, after British intervention in 1874, with British officials as well. He became Liu's trusted lieutenant and succeeded him as the third Kapitan Cina of Kuala Lumpur after Liu's death in 1869, after which he began to put together a sound administration and a strong fighting force. Yap's appointment however was challenged by the "relatives" of Liu, and a group opposed to Yap emerged under the leadership of Chong Chong. There were also constant warfare between two Chinese gangs, the Hakka-dominated Hai San (dominant in Kuala Lumpur) and the Cantonese-dominated Ghee Hin (based mainly in the Kanching and Rawang area), who fought to gain control of tin production in the town. At Kanching, an ally of Yap Ah Loy, Yap Ah Sze, was ambushed and murdered, probably at the instigation of Chong Chong, another Hakka headman. Yap Ah Loy then took his men to Kanching to drive out Chong Chong in 1870, and 12 Chinese and 8 Malays were killed in what would become known as 'the Kanching Massacre'. Chong Chong then fled to Rawang and joined Raja Mahdi's faction in the Selangor Civil War that broke out earlier in 1867. Yap Ah Loy sided with Tunku Kudin in the civil war, and Kuala Lumpur was attacked in 1870 by Yap's enemies who sided with Raja Mahdi. A further attack was attempted, and in 1872, Raja Mahdi's forces led by Syed Mashhor captured Kuala Lumpur, forcing Yap Ah Loy to flee to Klang. Yap attempted to retake Kuala Lumpur, and in March 1873, Tengku Kudin's faction, with support from Pahang fighters, defeated Mashhor and recaptured Kuala Lumpur. Yap's victory at Kuala Lumpur in 1873 placed him in a strong political position, and he was almost supreme in the interior of the state. However, Kuala Lumpur was gutted during the war and the mines flooded. Yap then set about rebuilding the town and rejuvenating the mining industry. He also improved the roads linking Kuala Lumpur with adjacent mining areas and other settlements. A slump in tin price mid 1870s however caused severe financial difficulties. He started a brick-making venture at Brickfields, as well as a tapioca plantation although that proved a costly failure. By the