<P> The first great expansion of the country came with the Louisiana Purchase of 1803, which doubled the country's territory, but brought it into minor conflict with the colonies of Spain which eventually resulted in the acquisition of Spanish Florida . The Oregon Country gave the United States access to the Pacific Ocean, though it was shared for a time with the United Kingdom . The annexation of the Republic of Texas in 1845 led directly to the Mexican--American War, after which the victorious United States obtained the northern half of Mexico's territory, including what was quickly made the state of California . However, as the development of the country moved west, the question of slavery became too much to ignore, as there was a struggle to keep the number of northern abolitionist states equal to the number of southern slave states, with vigorous debate over whether the new territories would allow slavery and events such as the Missouri Compromise and Bleeding Kansas . This came to a head in 1860 and 1861, when the governments of the southern states proclaimed their secession from the country and formed the Confederate States of America . The American Civil War led to the defeat of the Confederacy in 1865 and the eventual readmission of the states to the United States Congress . </P> <P> The country's expansion beyond North America began in 1856 with the passage of the Guano Islands Act, causing many small and uninhabited, but economically important, islands in the Pacific Ocean and Caribbean Sea to be claimed . Most of these claims were eventually abandoned due to competing claims from other countries or the guano having been mined out . The Pacific expansion culminated in the overthrow of the Kingdom of Hawaii in 1893 and its annexation in 1898 . Alaska, the last major acquisition in North America, was purchased from Russia in 1867 . </P> <P> Desires for expansion into Spanish territories like Cuba led to the Spanish--American War in 1898, in which the United States gained Guam, Puerto Rico, and the Philippines, and occupied Cuba for several years . American Samoa was acquired by the United States in 1900 after the end of the Second Samoan Civil War . The United States purchased the U.S. Virgin Islands from Denmark in 1917 . Guam and Puerto Rico remain territories; the Philippines became independent in 1946, after being a major theater of World War II . Following the war, many islands were entrusted to the U.S. by the United Nations, and while the Northern Mariana Islands remain a U.S. territory, the Marshall Islands, Federated States of Micronesia, and Palau emerged from the trust territory as independent nations . The last major international change was the acquisition in 1904, and return to Panama in 1979, of the Panama Canal Zone, a region of American sovereignty to build and run the Panama Canal . The final cession of power over the region was made to Panama in 1999 . </P> <P> Regarding internal borders, while territories could shift wildly in size, once established states have generally retained their initial borders . Only four states--Maine, Kentucky, Vermont, and West Virginia--have been created from land claimed by another state; all of the others were created from territories or directly from acquisitions . Four states--Louisiana, Missouri, Nevada, and Pennsylvania--have expanded significantly by acquiring additional federal territory after their initial admission to the Union . The last state of the contiguous United States, commonly called the "lower 48," was admitted in 1912; the fiftieth and most recent state was admitted in 1959 . </P>

What were two ways that the united states acquired more territory
find me the text answering this question