After the destructive raids of various ports and towns including the newly Spanish-established Manila by Chinese pirate Limahong, the colonial government saw the Chinese as a threat and decided to curb the Sangley in the colony by ethnic segregation and immigration control. Assimilation by conversion to Catholicism was also enforced by the governor-general Gómez Pérez Dasmariñas in the late 16th century. Only Catholic Sangleys, Indio wives and their Mestizo de Sangley children were granted land such as in Parían and nearby Binondo. However, these measures to attain racial control were seen to be difficult to achieve. As a result, four massacres, the first happening in 1603, and expulsions ensued against unconverted Sangleys. Other ethnic-motivated incidents were during the massacre of Sangleys as a retaliation to Koxinga's raids of several towns in Luzon during 1662. This resulted in a failed invasion. It was said that although the ethnic Chinese in the island themselves distanced from the military leader, anti-Chinese sentiments among locals grew and led to killings in the Manila area. Another event is after the 1762 British occupation of Manila amidst the Seven Years' War. As the Spanish, who regained control of invaded Manila and nearby port province of Cavite, many non-natives specifically Spanish, Mestizos, Chinese and Indians were imprisoned for supporting the British.