For millennia, the land that is currently Kansas was inhabited by Native Americans. The first European to set foot in present-day Kansas was Francisco Vásquez de Coronado, who explored the area in 1541.
In 1803, most of modern Kansas was secured by the United States as part of the Louisiana Purchase. Southwest Kansas, however, was still a part of Spain, Mexico, and the Republic of Texas until the conclusion of the Mexican-American War in 1848. From 1812 to 1821, Kansas was part of the Missouri Territory. The Santa Fe Trail traversed Kansas from 1821 to 1880, transporting manufactured goods from Missouri and silver and furs from Santa Fe, New Mexico. Wagon ruts from the trail are still visible in the prairie today.
In 1827, Fort Leavenworth became the first permanent settlement of white Americans in the future state. The Kansas-Nebraska Act became law on May 30, 1854, establishing the U.S. territories of Nebraska and Kansas, and opening the area to broader settlement by whites. Kansas Territory stretched all the way to the Continental Divide and included the sites of present-day Denver, Colorado Springs, and Pueblo.
Missouri and Arkansas sent settlers into Kansas all along its eastern border. These settlers attempted to sway votes in favor of slavery. The secondary settlement of Americans in Kansas Territory were abolitionists from Massachusetts and other Free-Staters, who attempted to stop the spread of slavery from neighboring Missouri. Directly presaging the American Civil War, these forces collided, entering into skirmishes that earned the territory the name of Bleeding Kansas.
Kansas was admitted to the United States as a slave-free state on January 29, 1861, making it the 34th state to enter the Union. By that time the violence in Kansas had largely subsided. But, during the Civil War, on August 21, 1863, William Quantrill led several hundred men on a raid into Lawrence, destroying much of the city and killing nearly 200 people. He was roundly condemned by both the conventional Confederate military and the partisan rangers commissioned by the Missouri legislature. His application to that body for a commission was flatly rejected due to his pre-war criminal record.
After the Civil War, many veterans constructed homesteads in Kansas. Many African Americans also looked to Kansas as the land of "John Brown" and, led by freedmen like Benjamin "Pap" Singleton, began establishing black colonies in the state. Leaving southern states in the late 1870s because of increasing discrimination, they became known as Exodusters.
At the same time, the Chisholm Trail was opened and the Wild West-era commenced in Kansas. Wild Bill Hickok was a deputy marshal at Fort Riley and a marshal at Hays and Abilene. Dodge City was another wild cowboy town, and both Bat Masterson and Wyatt Earp worked as lawmen in the town. In one year alone, 8 million head of cattle from Texas boarded trains in Dodge City bound for the East, earning Dodge the nickname "Queen of the Cowtowns."
In part as a response to the violence perpetrated by cowboys, on February 19, 1881 Kansas became the first U.S. state to adopt a Constitutional amendment prohibiting all alcoholic beverages.