The Philippine Army traces its origins to 1896 when the Katipunan formed the nucleus of the Revolutionary Philippine Army to fight for independence from Spanish rule. In 1897, the Philippine Revolutionary Government and Army were established under General Artemio Ricarte. Independence was declared in 1898 but the country soon faced the Filipino-American War as the Philippines was ceded to the United States. The modern Philippine Army was established in 1935 to defend the nation under US command. It has since played roles in defending the country during World War 2, participating in UN peacekeeping missions, and supporting counterinsurgency and development programs across the Philippines.