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).
Filipino nationalism
In the years before the 11th century, the Philippines was divided into numerous principalities known as barangays, a name derived from Malayan boats called balangays. These small political units were ruled by datus, rajahs or sultans. In 1565, European colonization began in earnest when Spanish explorer Miguel López de Legazpi arrived from Mexico and formed the first European settlements in Cebu. Beginning with just five ships and five hundred men accompanied by Augustinian monks, and further strengthened in 1567 by two hundred soldiers, he was able to repel competing Portuguese colonizers and to create the foundations for the Spanish colonization of the Archipelago. In 1571, the Spanish occupied the kingdoms of Maynila and Tondo and established Manila as the capital of the Spanish East Indies. This Spanish colonization united the Philippine archipelago into a single political entity.