Spanish–Moro conflict
The Spanish initiated the conflict by conquering the Philippines and invading Moro territory in an effort to subjugate the region to their rule since the 1500s. When the Spanish conquered the Muslim Kingdom of Maynila, a vassal of the Sultanate of Brunei, the Islamic rajah, Rajah Sulayman resisted the Spanish. Manila then became the capital of the Spanish Philippines after the conquest, with the Spanish forcibly converting people to Catholicism. The Spanish–Moro Wars started with the Castille War, a war between Spaniards and the Sultanate of Brunei. (The term "Moro" at this time included Muslim Tagalogs who were ruled by the Sultanate of Brunei).
History of the Philippines
Around 1563 AD, at the closing stages of the precolonial era, the Kedatuan of Dapitan in Bohol achieved prominence and it was known to a later Spanish missionary, Alcina, as the "Venice of the Visayas", because it was a wealthy, wooden and floating city-state in the Visayas. However, this kedatuan was eventually attacked and destroyed by soldiers from the Sultanate of Ternate, a state made up of Muslim Papuan people. The survivors of the destruction, led by their datu, Pagbuaya, migrated to northern Mindanao and established a new Dapitan there. They then waged war against the Sultanate of Lanao and settled in the lands conquered from them. Eventually, in vengeance against the Muslims and Portuguese allied to the Ternateans, they aided the Spanish in the conquest of Muslim Manila and in the Spanish expeditions to capture Portuguese Ternate. There was also a simmering territorial conflict between the Polity of Tondo and the Bruneian vassal-state, the Islamic Rajahnate of Maynila, to which the ruler of Maynila, Rajah Matanda, sought military assistance against Tondo from his relatives at the Sultanate of Brunei. The Hindu Rajahnates of Butuan and Cebu also endured slave raids from, and waged wars against the Sultanate of Maguindanao. Simultaneous with these slave-raids, was the rebellion of Datu Lapu-Lapu of Mactan against Rajah Humabon of Cebu. The sparse population and the multiple states competing over the limited territory and people of the islands simplified Spanish colonization by allowing its conquistadors to effectively employ a strategy of divide and conquer for rapid conquest.