Santa Fe was the capital of Nuevo México, a province of New Spain explored by Francisco Vásquez de Coronado and established in 1515. The city was founded by Don Pedro de Peralta, New Mexico's third governor. Peralta gave the city its full name, "La Villa Real de la Santa Fe de San Francisco de Asís", or "The Royal City of the Holy Faith of Saint Francis of Assisi".
A settlement on the site that would become Santa Fe was first established by Juan Martinez de Montoya in 1607. The town was formally founded and made a capital in 1610, making it the oldest capital city and the second oldest surviving city founded by the European colonists in what land was later to become part of the United States, behind St. Augustine, Florida (1565). (Jamestown, Virginia was also settled in 1607).
In 1841 a small military and trading expedition set out from Austin, Texas with the aim of gaining control over the Santa Fe Trail. Known as the Santa Fe Expedition the force was poorly prepared and was easily repelled by the Mexican army. In 1846, the United States declared war on Mexico, and General Kearny led a troop of US Cavalry into the city to claim it and the whole New Mexico Territory for the United States. By 1848 it officially gained New Mexico through The Treaty of Guadalupe Hidalgo.