Perak’s great wealth in tin put her in a state of constant threat from the Thais in the north and the Acehnese and Bugis in the south during the 16th to 18th centuries. The Dutch had also tried unsuccessfully to monopolies the tin trade. The rich deposits of tin drew a great number of Chinese miners who soon formed rival clans fighting for dominion over the mines. This constant warring and lawlessness and a power struggle between the successors to the Perak throne, Sultan Abdullah and Raja Ismail, gave the British administrators at the time, the opportunity to intervene. At the signing of the Pangkor Treaty in 1874, the British governor Sir Andrew Clarke installed Sultan Abdullah on the throne with the condition that he accept a British Resident.
The British soon put an administration in place to govern the state for the sultan. The first resident JWW Birch, disliked for his high-handedness, was assassinated in 1875. The British sent troops to maintain order and exiled Sultan Abdullah.
Birch’s successor the new Resident, Hugh Low, a more able administrator, ensured greater control over the mines, kept the chiefs in order, imposed taxes and regulated the affairs of the state. Perak prospered under his administration and Malaya saw its first railway line built from Taiping to Port Weld in 1885. It ensured faster movement of tin to the ports and hence greater production. In 1896, Perak became a member of the Federated Malay States until the Japanese Occupation.