Although Florida was under Spanish rule in the early 1800s, the Seminole Indians did not respect Spanish authority. The Seminoles made it a practice, for example, to harbor runaway slaves. General Andrew Jackson, having achieved a major military success against the Creek Indians in 1814, led an army into Florida against the Seminoles in 1817, looting and burning their villages. These advances led to a war between the United States and Spain. Jackson seized Pensacola in northern Florida, bringing the U nited States and Spain to a point where they had to negotiate or fight. On February 22, 1819, the Florida Purchase Treaty was signed, ceding Florida to the United States. When Jackson became President in 1828, he set about moving the Seminoles out of Fl orida altogether, an effort which led to the Second Seminole War of 1835-42.