In the later stages of the conflict Tengku Kudin managed to gain the support of British colonial administrators and in 1873 mercenaries from neighbouring Pahang.
[2] Raja Mahdi objected to the tax collection, on the grounds that he should be exempted as he was Selangorean royalty, and refused to pay.
This incident, exacerbated by Raja Mahdi's continued dissatisfaction with being ignored as the successor to Sultan Muhammad for the Selangorean throne following his death in 1857, in favour of Raja Abdul Samad (later became Sultan Abdul Samad), as well as further conflicts between their followers, worsened the already tense relationship between the two princes, which many believe were the initial causes for the outbreak of the Klang War.
Mohamad Akib was shot and killed in 1867 while attempting an assault at the fort, and his younger brother Mohamed Tahir assumed leadership of the Batu Bara clan.
One of Abdullah's sons, Raja Ismail, returned with three small ships to lay siege to Klang City, but was unable to retake it.
[3] When the Selangor Civil War broke out, Kapitan Cina of Kuala Lumpur Yap Ah Loy was faced with internecine fighting among dissident Chinese groups as well as attacks from other Malay factions.
The two largest Chinese gangs, the Kuala Lumpur-based Hai San and the Selayang-based Ghee Hin, had engaged in fighting to gain control of tin production in the town.
After Raja Mahdi took Klang City, he had in fact scheduled a ceremony to formally invest Yap into the office of Kapitan in 1869.
Sultan Abdul Samad then appointed his son-in-law as Viceroy of Selangor with a mandate to carry out mediation between the warring parties, first on 26 June 1868.
Simultaneously, cracks emerge between Raja Mahdi and his former ally, Mohamed Tahir, leader of the Batu Bara clan.
Tahir also informed Tengku Kudin (and Sultan Abdul Samad) that he was able, through his contacts in Singapore, to supply them with weapons and ammunition in their fight against Raja Mahdi.
Syed Mashhor, then serving under Tengku Kudin, was deployed to Kuala Selangor to assist Raja Musa but defected upon learning that his brother had been killed by a son of Sultan Abdul Samad.
[15] Raja Mahdi and his Chinese allies from Selayang who were enemies of Yap, unsuccessfully mounted an offensive on Kuala Lumpur in 1870, with support from Malay troops led by Syed Mashhor.
[9][11] Meanwhile, the conflict disrupted the economy and trade with the British Straits Settlements, while also raising concerns over security, especially with the occurrence of piracy.
The British soon captured Kuala Selangor in an expedition, driving out Mahdi's men out and giving the town to Tengku Kudin.
[3] The fighting continued for a few more months, but on 8 November 1873 the Pahangese forces captured Kuala Selangor and the war largely ended.
[2] While the British through the new governor Andrew Clarke backed Tengku Kudin, the post-war situation made his position untenable.
The British were concerned about the disruption caused by the war to their trade and investments in the region, eventually siding with Tengku Kudin, in part because Raja Mahdi and some of his followers had attacked shipping in the Strait of Malacca.