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).
Sulu
The navigational error that landed Ferdinand Magellan in Limasawa brought awareness of Europe to the Philippines and opened the door to Spanish colonial incursion. The Spaniards introduced Catholicism and a political system of church-state dichotomy, which encountered fierce resistance in the devastating Moro wars from 1578 to 1899. The Sultanate of Sulu formally recognised Spanish sovereignty in Tawi-Tawi and Sulu in middle of 19th century, but these areas remained partially ruled by the Spanish as their sovereignty was limited to military stations and garrisons and pockets of civilian settlements, until they had to abandon the region as a consequence of their defeat in the Spanish–American War.