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 the 19th century, Philippine ports opened to world trade and shifts started occurring within Filipino society. Many Spaniards born in the Philippines (') and those of mixed ancestry (') became wealthy and an influx of Hispanic American immigrants opened up government positions traditionally held by Spaniards born in the Iberian Peninsula ('). Hispanic-Philippines reached its zenith when the Philippine-born Marcelo Azcárraga Palmero became Prime Minister of the Spanish Empire. However, ideas of rebellion and independence began to spread through the islands. Many Latin-Americans and Criollos were mostly officers in the army of Spanish Philippines. However, the onset of the Latin American wars of independence led to serious doubts of their loyalty, so they were soon replaced by Peninsular officers born in Spain. ' and "Latino" dissatisfaction against the "Peninsulares" resulted in the uprising of Andres Novales which was supported by local soldiers as well as former officers in the Spanish army of the Philippines who were from the now independent nations of Mexico, Colombia, Venezuela, Peru, Chile, Argentina and Costa Rica. The uprising was brutally suppressed but it foreshadowed the 1872 Cavite Mutiny that was a precursor to the Philippine Revolution.