Spanish rule ended in 1898 with Spain's defeat in the Spanish–American War. The Philippines then became a territory of the United States. U.S. forces suppressed a revolution led by Emilio Aguinaldo. The United States established the Insular Government to rule the Philippines. In 1907, the elected Philippine Assembly was set up with popular elections. The U.S. promised independence in the Jones Act. The Philippine Commonwealth was established in 1935, as a 10-year interim step prior to full independence. However, in 1942 during World War II, Japan occupied the Philippines. The U.S. military overpowered the Japanese in 1945. The Treaty of Manila in 1946 established the independent Philippine Republic.