British influence in Perak, a state in northwestern Malaysia, began in 1818 when trading agreements were first made with local chiefs. The Pangkor Treaty of 1874 allowed Britain to send its first resident, James W.W. Birch (d. 1875), to take charge of governmental administrative affairs. Soon after his arrival later in 1874, Birch changed many old-fashioned and inefficient procedures and policies, especially those concerning revenue collection and slavery. The sultan of Upper Perak and other Malay chiefs met secretly in July 1875, and decided to get rid of Birch, whose ways of modernization they opposed, and to end all foreign influences. While in Upper Perak on tax business, Birch was murdered by one of the chiefs and his warriors. British troops were promptly sent into Perak and quickly stamped out all resistance. By mid-1876, the dissident chiefs were arrested, and later tried and punished; the sultan was deposed. The Malayans had failed to halt the increasing British political and economic influence; subsequent British residents, however, did not try to make changes on their own but instead operated jointly with the native Malay rulers.