In 1874, Selangor accepted a British Resident who would "advise" the Sultan, and Klang became the capital of British colonial administration for Selangor from 1875 until 1880 when the capital city was moved to Kuala Lumpur due to the growth of Kuala Lumpur from tin-mining.