After almost four centuries as part of the Kingdom of Spain, the United States occupied the island following Spain's defeat in the 1898 Spanish–American War, as part of the Treaty of Paris of 1898. Guam was transferred to the United States Navy control on December 23, 1898, by from 25th President William McKinley.