Klang War

The Klang War or Selangor Civil War took place in the Malay state of Selangor and was fought between Raja Abdullah bin Raja Jaafar, the administrator of Klang and Raja Mahadi bin Raja Sulaiman from 1867 to 1874. Raja Abdullah the head of Hulu Klang, appointed by Sultan Muhammad Shah of Selangor between 1849 and 1850.

Reason for war
Before the sultan appointed Raja Abdullah as Klang's administrator, Raja Mahadi's father, Raja Sulaiman was Klang's head. In 1866, Raja Abdullah leased Klang to two traders from the Straits Settlements; William Henry Macleod Read and Tan Kim Ching. Among benefits of being a renter was tax collection. When the two traders went out to collect tax, Raja Mahadi was offended. Given his standing within the Malay communities, he refused to pay tax to foreigners.

Sultan Muhammad died in 1857 and was replaced by Sultan Abdul Samad. With sympathy from the new royal family of Selangor, Raja Mahadi began to challenge Raja Abdullah's authority in Klang. The royal court considered Raja Abdullah, which was from Riau instead of Selangor, as an outsider. On Raja Abdullah's side was his son, Raja Ismail. The Chinese labourers were divided between the two camps.

Chinese Kongsi Involvement
When the Selangor Civil War broke out in 1870, Kapitan Cina Yap Ah Loy was faced with internecine fighting among dissident Chinese groups as well as attacks from Malay factions. The two largest Chinese gangsters, the Hakka-dominated Hai San and the Cantonese-dominated Ghee Hin, frequently engaged in warfare to gain control of tin production in the town. The incessant warfare between the two factions brought tin mine production to a standstill.

Tengku Kudin enters the war
In 1867, Tengku Dhiauddin Zainal Rashid, also known as Tengku Kudin, a prince from Kedah, married into the Selangor royal family. The Sultan appointed his son-in-law as Vice Yamtuan and arbitrator twice during the war; first on 26 June 1868 and again on 22 July 1871.

Raja Mahadi however flatly refused the peace effort. Offended by Raja Mahadi's blunt no, Tengku Kudin sided with Raja Abdullah and Raja Ismail instead and this precipitated a war. The coalition against Raja Mahadi received a blow when Raja Abdullah died of natural cause. However, an influential Chinese kapitan, Yap Ah Loy, of whom was responsible for the early development of Kuala Lumpur joined Tengku Kudin's cause.

Meanwhile, the British Straits Settlements were becoming increasingly dependent on the economy of Selangor. Selangor through the 19th and the 20th was one of the world's major tin producers. Since Selangor's security affected tin trade, the British felt it needed to have a say in Selangor politics. The British saw Tengku Kudin as a ticket to reach out to Selangor's royal court. Therefore, the Straits Settlements led by Andrew Clarke implicitly supported Tengku Kudin.

Throughout the war, Tengku Kudin brought in 500 soldiers from Kedah along with mercenaries and European officers from the Straits Settlements. Sultan Abdul Samad also provided Langat to Tengku Kudin to help him fund the handling of the war. Tengku Kudin in turn engaged the help of Pahang in 1872, mercenaries and Sir Andrew Clarke of the British Empire. This marked the first British involvement in local politics.

The royal family was greatly disappointed with the outcome of the war and viewed Tengku Kudin with suspicion. What made the situation worse was Tengku Kudin's army from Pahang. After the war, the army refused to return to Pahang because they wanted to collect tax as a payment for their service. While the British through the new Governor Andrew Clarke was on Tengku Kudin's side, the post-war situation had weakened Tengku Kudin's power base. Therefore, Andrew Clarke was forced to freeze the plan to reach out to the royal family through Tengku Kudin.

British Resident
In November 1873 however, a ship from Penang was attacked by pirates near Kuala Langat, Selangor. After a number of piracy attacks took place in Selangor, Andrew Clarke assigned Frank Swettenham as a live-in advisor to Sultan Abdul Samad in August 1874. Sultan Abdul Samad accepted James Guthrie Davidson, a lawyer from Singapore, as the first British Resident of Selangor in 1875. In October the same year, Sultan Abdul Samad sent a letter to Andrew Clarke requesting for Selangor to be placed under the British protectorate.

The war ended in 1874 and was won over by Tengku Kudin and Raja Ismail while Raja Mahadi step down. Raja Mahadi died and was buried in Klang.

The Sultan later handed over the ruling power of Klang to Tungku Kudin after the war was won in 1874. In 1878 Tengku Kudin stood down from this post.