The lands flanking the Santa Barbara Channel, both the mainland including present day Santa Barbara, and the Channel Islands, has been continuously inhabited by the Chumash people and their ancestors for at least 13,000 years. The oldest human skeleton yet found in North America, Arlington Springs Man, was unearthed on Santa Rosa Island, approximately 30 miles (48 km) from downtown Santa Barbara.
In more recent pre-Columbian times the Chumash had many villages along the shores and inland, at least one of which, on present-day Mescalitan Island, had over a thousand inhabitants in the 16th century. They were peaceful hunter-gatherers, living from the region's abundant natural resources, and navigating the ocean in tomols, craft closely related to those used by Polynesians. Their rock art work can be seen in nearby Chumash Painted Cave, and their sophisticated basket weaving at the Santa Barbara Museum of Natural History. The Santa Barbara bands spoke the Barbareño language dialect of the Chumashan languages group. As Europeans settled in their homelands the Chumash population declineed.
 Spanish periodMission Santa Barbara as it was in 2005. It was rebuilt after the 1812 earthquake, and the towers were repaired again after the 1925 earthquake.
The first European to see the area was the Portuguese explorer João Cabrilho, who sailed through the Channel in 1542, and anchored briefly in the vicinity of Goleta. He injured himself on the trip, dying of his injury in January 1543, and was buried either on San Miguel Island or Mescalitan Island – the exact burial place of Cabrilho has long been a mystery. Sir Francis Drake also sailed past the area in 1579, but is not known to have made anchorage. In 1602, Sebastian Vizcaino gave the name "Santa Barbara" to the region, in gratitude for having survived a violent storm in the Channel on December 3, the eve of the feast day of Saint Barbara. However it was not until 1769 that Europeans established a colonizing land presence, with the arrival of Gaspar de Portolá and Franciscan missionary Junípero Serra in upper Las Californias. This expedition was sent by King Carlos III to occupy the region, convert the natives to Christianity, and fortify it against perceived threats of other encroaching European colonial powers – principally the early British Empire and tsarist Russian-Pacific Empire.
Portola's expedition reached Santa Barbara on August 14, 1769, encountering exceptionally friendly natives, many of whom lived in Syuxtun, a village just in back of the beach between present-day Chapala and Bath streets. Indeed the natives – which the Spaniards dubbed the Canaliños for the "canoes" (actually tomols) they used so skillfully – so irritated their guests with gifts and boisterous music that Portola changed the location of his camp so his soldiers and missionaries could get some rest. Portola, however, did not stay, and it was not until 1782 that a force of soldiers, led by Don Felipe de Neve and again accompanied by Junipero Serra, came to build the Presidio of Santa Barbara, one of several military outposts meant to protect the area against foreign interests. While the Presidio was not completed until 1792, Padre Lasuén dedicated the new Mission Santa Barbara on the feast day of Santa Barbara (December 4, 1786). He chose for his building site the location of a Chumash village on Mission Creek named Tay-nay-án.
Many of the soldiers who came to build and garrison the Presidio had brought their families with them, and after their terms of service ended settled in Santa Barbara. They built their adobes near the Presidio, arranged haphazardly; a Boston journalist described the scatter of these buildings "as though fired from a blunderbuss." Most of Santa Barbara's old families are descended from these early settlers, and many of their names linger in the street and place names, such as Cota, De la Guerra, Gutierriez, Carrillo, and Ortega.
Building the Mission itself continued throughout the rest of the century, along with the work of converting the Indians to Christianity, a task which proved difficult: according to the Mission registers, by 1805, only 185 of the more than 500 Indians in Santa Barbara had been baptized. The burial register shows that 3,997 Indians died between 1787 and 1841, the majority from diseases such as smallpox, to which the natives had no natural immunity. By 1803 the Mission's chapel was finished, and by 1807 a complete village for the Indians had been completed, largely by their own labor. The site of this village is on the Mission grounds along modern-day Constance Street.
On December 21, 1812, one of the largest earthquakes in California history completely destroyed the first Mission along with most of Santa Barbara. With an estimated magnitude of 7.2, and a hypothesized epicenter near Santa Cruz Island, the quake also produced a tsunami which carried water all the way to modern-day Anapamu Street, and carried a ship a half-mile up Refugio Canyon. Following the devastating earthquake, the Mission padres decided to build a larger and more elaborate Mission complex, which is the one that survives to the present day. While the church was ready in 1820, the bell towers were not finished until 1833.
The most serious military threat to Santa Barbara during the Spanish period was not by a colonial power, but by Hippolyte de Bouchard, a French privateer working for the Argentine government, which was, along with Mexico, attempting to throw off Spanish rule. Bouchard, who was given the task of destroying as many Spanish assets as possible, and in particular the ports in the Americas, possessed two well-armed frigates, which had sufficient armament and crews to destroy any lightly defended towns they encountered. He had done exactly that to Monterey, the capital of Alta California, shortly before coming to Santa Barbara.
Bouchard landed first at Refugio Canyon, where they pillaged and burned the ranch belonging to the Ortega family, killing the cattle and slitting the throats of the horses. However, after being alerted by messengers from Monterey, the Presidio dispatched a squadron of cavalry, who caught three stragglers from the ill-disciplined raiding party and dragged them back to Santa Barbara in chains. Bouchard sailed the remaining twenty miles (32 km) to Santa Barbara a few days later, anchoring off of present-day Milpas Street, and threatened to shell the town unless his men were returned to him. José de la Guerra y Noriega, the commandante of the Presidio, granted his request, but Bouchard did not realize that he had been tricked: the town was not as heavily defended as it had seemed to be; the hundreds of cavalrymen Bouchard had seen through his spyglass were but the same few dozen riding in large circles, stopping and changing costumes each time they passed behind a patch of heavy brush. Although Bouchard had recently destroyed Monterey, he departed without destroying the town.