Selangor
In 1836, Sultan Muhammad Shah ruled Selangor, a Malay sultanate on the western coast of the Malay Peninsula. Selangor’s ruling dynasty was of Bugis origin and had established the sultanate in the eighteenth century. Tin mining later drew workers and merchants into the Klang Valley.
The sultan’s decision in 1854 to grant control of Klang to Raja Abdullah instead of Raja Mahadi, the previous chief’s son, led to the Selangor Civil War of 1867–1874. In 1874, Sultan Abdul Samad accepted a British Resident, giving Britain control over much of the administration while retaining the throne.
The colonial administration moved from Klang to Kuala Lumpur in 1880. In 1896 Selangor joined Perak, Negeri Sembilan and Pahang in the Federated Malay States, with Kuala Lumpur as the federal capital.