The United States began as 13 British colonies on the Atlantic Coast. In 1783, the United States gained the Northwest Territory, the area encompassing what is now Ohio, Indiana, Illinois, Michigan, and Wisconsin. Spain and the United States agreed on the northern boundary of Florida in 1798 and the United States then took control of the Mississippi Territory. In 1803, the Louisiana Purchase (which included most of the area west of the Mississippi) doubled the size of the country. In 1845 the independent Republic of Texas was annexed and Spain ceded Florida to the United States. In 1846, the Oregon Territory (which included Oregon, Washington, and Idaho) was officially designated with a treaty between the United States and the United Kingdom. The Mexican War of 1846–1848 led to the secession of California, Utah Territory, and New Mexico territory to the United States. The Gadsden Purchase of 1853 added southern Arizona. Alaska was purchased from Russia in 1867 and, finally, Hawaii was annexed by the United States in 1898.