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).
Philippines
In 1521, Portuguese explorer Ferdinand Magellan's expedition arrived in the Philippines, claimed the islands for Spain and was then killed at the Battle of Mactan. Colonization began when Spanish explorer Miguel López de Legazpi arrived from Mexico in 1565 and formed the first Hispanic settlements in Cebu. After relocating to Panay island and consolidating an alliance of native Filipino (Visayan) allies, Hispanic soldiers and Latin-American recruits, led by conquistadors such as Mexico-born Juan de Salcedo who was inspired by his love for the beautiful princess of Bruneian-besieged Tondo, Kandarapa, the Spanish-Mexican-Filipino coalition then invaded Islamic Manila, liberated and incorporated Tondo, and afterwards put down the Conspiracy of the Maharlikas and exiled the conspirators to Guam and Guerrero. Under Spanish rule, they established Manila as the capital of the Spanish East Indies (1571).