In 1854, the sultan of Selangor Sultan Muhammad Shah appointed Raja Abdullah bin Raja Ja'afar as Klang district's administrator. Raja Abdullah and his brother Raja Juma'at had previously helped Raja Sulaiman pay a debt incurred during a failed mining venture, and was therefore rewarded with the chieftainship of Klang. Raja Mahdi (also spelt Raja Mahadi), Sultan Muhammad Shah's grandson and whose father Raja Sulaiman was the previous Klang's head, therefore became disinherited. Raja Abdullah and Raja Juma'at, who had opened very successful tin mines in Lukut (near today's Port Dickson), then obtained the finance to open tin mines near Kuala Lumpur in 1857. The success of the tin mines generated considerable revenues, and the struggle for the control of the revenues from the tin mines as well as political power were essentially the reasons for the war.