Through the late eighteenth and early nineteenth centuries, Spain gradually exposed the Philippines to international commerce and, as a consequence, to the contemporary currents of European political thought. In 1834 Spain opened the Philippine ports to international free trade. Until then, Philippine agriculture had produced little more than a subsistence plus the small surplus that local markets could absorb. Under the influence of British and American merchants trading internationally, Philippine agriculture was transformed from local self-sufficiency to the export of cash crops for international markets; principally tobacco, sugar and abaca (hemp fibre for rope).
The commercialization of Philippine agriculture and the resulting economic expansion greatly advantaged the landed elite in the country and the Chinese mestizo merchants in the provincial centers. Importantly, many used their new prosperity to obtain modern, professional educations, both in the Philippines and in Europe, for their families.
The friarocracy had long used its control of education in the colony to maintain its position. The religious orders excluded the teaching of foreign languages and scientific and technical subjects from their curricula. The Spanish government conceded to the growing demand for educational reform and in 1863 introduced a system of public education that opened new opportunities to Filipinos for higher learning.
A long standing source of resentment was the exclusion of Filipinos from the religious orders and the priesthood. This led to the armed revolt of Apolinario de la Cruz in 1841. The Spanish put down the revolt and executed Brother Apolinario.
Spain itself was having trouble adjusting to the liberal democratic aspirations of nineteenth century Europe. In 1868, a liberal revolution in Spain deposed Queen Isabella II and gave rise to the short lived First Republic. A liberal governor, General Carlos Maria de la Torre, was appointed at this time to the Philippines. He abolished censorship and extended to Filipinos the rights of free speech and assembly contained in the Spanish constitution of 1869. The popular governor did not last long. De la Torre was replaced in 1871 by Rafael de Izquierdo who promptly rescinded the liberal measures.
The following year in Cavite, 200 Filipino recruits revolted and murdered their Spanish officers. The Spanish suppressed the revolt brutally and used the opportunity to implicate the liberal critics of Spanish authority in an imaginary wider conspiracy. Many liberals were arrested or driven into exile. A military court condemned the reformist Fathers Jose Burgos, Mariano Gomez and Jacinto Zamora to death. The three priests were garroted publicly on February 20, 1872 and made martyrs for the nationalist cause. The Spanish repression succeeded in joining the religious and secular discontents in a common spirit of Filipino nationalism opposed to the colonial authority.
The Philippine emigre community in Spain, exiles and students, developed the Propaganda Movement. It advocated the moderate aims of legal equality between Spaniards and Filipinos, Philippine representation in the Spanish Cortes (parliament), free speech and association, secular public schools and an end to the annual obligation of forced labour.
A prominent Propagandist was Graciano Lopez Jaena who left the Philippines for Spain in 1880 after publishing a satirical novel, Fray Botod (Brother Fatso), describing the life of a rural friar. In 1889 he started the newspaper, La Solidaridad (Solidarity), that circulated both in Spain and the Philippines and was the medium of the Propaganda Movement. Another Propagandist was a reformist lawyer, Marcelo del Pilar, who was active in the anti-friar movement. He fled to Spain in 1888 and became editor of La Solidaridad.
The most famous Propagandist was Jose Rizal. He studied medicine at the University of Santo Tomas in the Philippines and in 1882 went to complete his studies at the University of Madrid. He took an interest in anthropology with a view to discrediting the racial notions of Filipino inferiority through the scientific study of the history and ethnology of the Malay people. His more popular works were his two novels Noli Me Tangere (Touch Me Not) and El Filibusterismo (The Subversive) published in 1886 and 1891 respectively. The novels portrayed the authoritarian and abusive character of Spanish rule in the colony. Despite their ban, the books were smuggled into the Philippines and widely read.
Rizal returned to the Philippines in 1892 and founded a national organization for peaceful reform - La Liga Filipina (The Philippine League). He was soon arrested for revolutionary agitation and exiled to the isolation of Dapitan on Mindanao.
Rizal's arrest and exile in 1892 set in train a chain of events that was to lead directly to armed insurrection for national independence. On the night of Rizal's arrest, Andres Bonifacio founded a secret society, the Katipunan (The Highest and Most Respectable Association of the Sons of the People), modeled on the Masonic Order and dedicated to national independence through revolution. From its origins in the Tondo district of Manila, Bonifacio gradually built the Katipunan to a strength of 30,000 members.
In another Spanish colony, 15,000 km away, the Cuban revolution for independence started in February 1895. To escape from his exile, Rizal volunteered to serve as a doctor for the Spanish army in Cuba. Rizal's offer was accepted but just as he left for Cuba by ship, the Spanish learned of Bonifacio's Katipunan. The Spanish began making hundreds of arrests and Bonifacio had little choice but to issue the call to arms, the Cry of Balintawak, on August 26, 1896.
Bonifacio and Emilio Jacinto attacked the Spanish garrison at San Juan on August 29, 1896 with 800 Katipuneros. Insurrections also broke out in eight provinces surrounding Manila on Luzon and soon spread to other islands. The rebels were not trained regulars and had little success against the colonial troops. In the province of Cavite, however, under the leadership of Emilio Aguinaldo, the Katipunan rebels defeated the Civil Guard and the colonial troops.
Meanwhile, Rizal was arrested in transit to Cuba and ordered returned to Fort Santiago in Manila to stand trial for rebellion, sedition and illicit association. He was tried on December 26, found guilty and condemned to death. Jose Rizal was shot by a firing squad on December 30, 1896. Rizal's execution gave the rebellion fresh determination.
The Katipunan was divided between factions loyal to Bonifacio and Aguinaldo. Due to his successes in battle, Aguinaldo was elected to replace Bonifacio. Bonifacio withdrew his supporters and the two factions began to fight. Bonifacio was arrested, tried and executed on May 10, 1897 by Aguinaldo's order.
Aguinaldo's forces were driven from Cavite to Bulacan where Aguinaldo declared the constitution and established the Republic of Biak-na-Bato. Both sides soon came to realize that the struggle between Spain and the new Republic had reached an impasse. The rebels could not meet the Spanish regulars in the field but neither could the Spanish put down the guerrillas.
Negotiations began in August and concluded in December with the Pact of Biak-na-Bato. The agreement extended a general amnesty to the rebels with a payment of US$800,000 for Aguinaldo and his government to retire in voluntary exile to Hong Kong. Aguinaldo left the Philippines with his government on December 27, 1897. While in Hong Kong, Aguinaldo and his compatriots designed what is today the Philippine national flag.