The Philippines was an American colony from 1898 to 1946. After the Spanish-American War in 1898, Spain ceded control of the Philippines to the United States. The U.S. promised to train Filipinos in democracy and self-government to become an independent nation. From 1902 to 1934, the U.S. gradually granted more autonomy to the Philippines while developing its economy. A 1934 act assured independence within 10 years, leading to the establishment of the Philippine Commonwealth. However, Japan invaded the Philippines in 1941, until Allied forces returned in 1944. The Philippines finally became fully independent in 1946.