As Perak continued to increase its mining operations, it suffered a shortage of labour. Looking to solve the problem, Malay administrator Long Jaafar invited the Chinese in Penang to work in Perak, particularly at Larut. By the 1840s, Perak's Chinese population exploded. The new immigrants more often than not were members of Chinese secret societies. Two of the largest were Ghee Hin and Hai San. These two groups regularly tried to increase their influence in Perak and this resulted in frequent skirmishes. These skirmishes were getting out of hand, so that even Ngah Ibrahim, the "Menteri Besar", or chief minister, was unable to enforce the rule of law.