<P> In 1898, as conflicts continued in the Philippines, the USS Maine, having been sent to Cuba because of U.S. concerns for the safety of its citizens during an ongoing Cuban revolution, exploded and sank in Havana harbor . This event precipitated the Spanish--American War . After Commodore George Dewey defeated the Spanish squadron at Manila, a German squadron, led by Vice Admiral Otto von Diederichs, arrived in Manila and engaged in maneuvers which Dewey, seeing this as obstruction of his blockade, offered war--after which the Germans backed down . </P> <P> The U.S. invited Aguinaldo to return to the Philippines in the hope he would rally Filipinos against the Spanish colonial government . Aguinaldo arrived on May 19, 1898, via transport provided by Dewey . By the time U.S. land forces had arrived, the Filipinos had taken control of the entire island of Luzon, except for the walled city of Intramuros . On June 12, 1898, Aguinaldo declared the independence of the Philippines in Kawit, Cavite, establishing the First Philippine Republic under Asia's first democratic constitution, the Malolos Constitution, an insurgency against Spanish rule . </P> <P> Spain and the United States sent commissioners to Paris to draw up the terms of the Treaty of Paris which ended the Spanish--American War . In the treaty, Spain ceded the Philippines, along with Guam and Puerto Rico, to the United States . Cession of the Philippines involved payment by the U.S. of US $20,000,000.00 . U.S. President McKinley described the acquisition of the Philippines as "...a gift from the gods", saying that since "they were unfit for self - government,...there was nothing left for us to do but to take them all, and to educate the Filipinos, and uplift and civilize and Christianize them", in spite of the Philippines having been already Christianized by the Spanish over the course of several centuries . </P> <P> Filipino forces under Aguinaldo as President of the insurrgent Philippine Republic resisted the U.S. occupation, resulting in the Philippine--American War (1899--1913). The poorly - equipped Filipino troops were easily overpowered by American troops in open combat, but they were formidable opponents in guerrilla warfare . Malolos, the revolutionary capital, was captured on March 31, 1899 . Aguinaldo and his government escaped however, establishing a new capital at San Isidro, Nueva Ecija . On June 5, 1899, Antonio Luna, Aguinaldo's most capable military commander, was killed by Aguinaldo's guards in an apparent assassination while visiting Cabanatuan, Nueva Ecija to meet with Aguinaldo . Aguinaldo dissolved the regular army on November 13 and ordered the establishment of decentralized guerrilla commands in each of several military zones . Another key general, Gregorio del Pilar, was killed on December 2, 1899 in the Battle of Tirad Pass--a rear guard action to delay the Americans while Aguinaldo made good his escape through the mountains . </P>

Nationalism was non existent in the philippines before the 19th century