The United States invoked the Monroe Doctrine to defend its increasingly imperialistic role in the Americas in the mid-19th century, but it was not until the Spanish-American War in 1898 that the United States declared war against a European power over its interference in the American hemisphere.