The Philippine declaration of independence occurred in 1898 when General Emilio Aguinaldo proclaimed the independence of the Philippine Islands from Spain. This was in part made possible by the defeat of Spain during the Spanish American War, in Manila Bay. After the War was ended the Philippine Islands were ceded to the United States by Spain in the treaty of Paris. Philippine Independence was not recognized until 1946 in the Treaty of Manila.
I believe that the Philippines was able to gain Independence because America gained control over the Philippines. If America did not defeat the Spanish in Manila Bay, the Philippines might still be in Spanish control. And if the Philippines were still in Spanish control they would have been under Spanish control for a very long time. By 1900 Spain had already lost a lot of it’s colonized land and they probably did not want to lose The Philippines.