After the United States gained control of the Philippines in the Treaty of Paris (1898), the Pacific archipelago was soon embroiled in a conflict similar to the one in Cuba, which had developed into the Spanish-American War: Filipinos, determined to achieve independence, revolted in an uprising that lasted from 1899 to 1901. A civil government was established on the Philippines in 1901, and in November 1935, the Commonwealth of the Philippines was officially established. However, the islands would continue to be the site of conflict in the coming decades, as the United States again struggled with a foreign power—this time the Japanese—for control of the islands during World War II (1939–45).