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).
Raid on Manila (1798)
The Raid on Manila of January 1798 was a Royal Navy false flag military operation during the French Revolutionary Wars intended to scout the strength of the defences of Manila, capital of the Spanish Philippines, capture a Manila galleon and assess the condition of the Spanish Navy squadron maintained in the port. Spain had transformed from an ally of Great Britain in the War of the First Coalition into an enemy in 1796. Thus the presence of a powerful Spanish squadron at Manila posed a threat to the China Fleet, an annual convoy of East Indiaman merchant ships from Macau in Qing Dynasty China to Britain, which was of vital economic importance to Britain. So severe was this threat that a major invasion of the Spanish Philippines had been planned from British India during 1797, but had been called off following the Treaty of Campo Formio in Europe and the possibility of a major war in India between the British East India Company and the Kingdom of Mysore.