On June 12 1898, the Philippine Declaration of Independence was proclaimed in Cavite II el Viejo (Cavite), the Philippines. When the Act of Declaration of Independence was read out at a public meeting the Filipino revolutionary forces under General Emilio Aguinaldo declared the sovereignty and independence of the Philippine Islands from the colonial rule of Spain.
The revolution began in 1896 and the next year in December, the Spanish Government and the revolutionaries signed a truce. It was called the Pact of Biak-na-Bato. According to the Pact, the Spanish had to pay 800,000 pesos to the revolutionaries and Aquinaldo and other leaders would be exiled to Hong Kong.
In April 1898, when the Spanish-American War broke out, Commodore George Dewey aboard the U.S.S. Olympia sailed from Hong Kong to Manila Bay. In May, the U.S. defeated the Spanish in the Battle of Manila Bay.
On May 19, Aguinaldo returned to the Philippines. A month later Independence was proclaimed at the ancestral home of General Emilio Aguinaldo. The national flag was unfurled and the national anthem was sung.
However, the declaration was never recognised by either the U.S. or Spain. In 1898, Spain gave up the Philippines to the U.S. in the 1898 Treaty of Paris, and this ended the Spanish-American War. But, the Philippine Revolutionary Government did not recognise the treaty. They fought and lost a conflict with the U.S.
This came to be known as the Philippine Insurrection, but is now called the Philippine-American War. Aguinaldo was captured and was forced to issue a statement declaring and accepting the sovereignty of the U.S.
After World War II, the U.S. decided to grant independence to the Philippines with the Treaty of Manila. Till 1964, July 4 was celebrated as Independence Day. But historians and nationalists decided that July 12 was the actual Day.