The U.S. acquired the Philippines from Spain on December 10, 1898 via the Treaty of Paris, which ended the Spanish–American War. However, Philippine revolutionaries led by Emilio Aguinaldo declared independence and in 1899 began fighting the U.S. troops. The Philippine–American War ended in 1901 after Aguinaldo was captured and swore allegiance to the U.S. Likewise the other insurgents accepted American rule and peace prevailed, except in some remote islands under Muslim control. Roosevelt continued the McKinley policies of removing the Catholic friars (with compensation to the Pope), upgrading the infrastructure, introducing public health programs, and launching a program of economic and social modernization. The enthusiasm shown in 1898–99 for colonies cooled off, and Roosevelt saw the islands as "our heel of Achilles." He told Taft in 1907, "I should be glad to see the islands made independent, with perhaps some kind of international guarantee for the preservation of order, or with some warning on our part that if they did not keep order we would have to interfere again." By then the President and his foreign policy advisers turned away from Asian issues to concentrate on Latin America, and Roosevelt redirected Philippine policy to prepare the islands to become the first Western colony in Asia to achieve self-government. The Filipinos fought side by side with the Americans when the Japanese invaded in 1941, and aided the American re-conquest of the islands in 1944–45; independence came in 1946.