According to historical legends, the San Luis Rey Mission flocks were robbed by a small band of Native Americans in the late 18th century. Fleeing the Spanish troops, the Native Americans escaped to the hills. While pursuing the Native Americans, in 1797 the Spaniards came upon a fertile valley, which was named Los Vallecitos de San Marcos (Little Valleys of Saint Mark) to honor the day of discovery: April 25, St. Mark’s Day. On April 22, 1840, Governor Juan B. Alvarado granted Rancho Vallecitos de San Marcos to his relative, Jose María Alvarado. Jose Alvarado was killed at the Pauma Massacre in 1846, and the land was left to his wife; she then sold the land to Lorenzo Soto. In the late 1850s, Soto sold part of his land to Cave Couts, and his family was soon raising livestock. Although Cave Couts owned the land, Major Gustavus French Merriam from Topeka, Kansas, made the first permanent settlement. Merriam homesteaded 160 acres in the north Twin Oaks Valley and began wine and honey production.
After Major Merriam’s settlement, German and Dutch immigrants began moving into the area in the early 1880s. In 1883, a few miles south of the settlement, John H. Barham (for whom the present-day Barham Drive is named) founded the first town in the area, originally situated on the southeast corner of what are now Rancho Santa Fe Road and San Marcos Boulevard. By 1884, the town of Barham had a post office, blacksmith, feed store and weekly newspaper. In 1887, the San Marcos Land Company bought almost all of the San Marcos land formerly owned by the Couts family and promptly divided the land into tracts. Soon the beautiful hills began attracting home-seekers.
The original town of San Marcos was about a mile north of Barham, at the intersection of what is now Grand Avenue and Rancho Santa Fe Road. In 1887, the Santa Fe Railroad announced that it was going to lay tracks going through the valley, but to the disappointment of the citizens, the tracks were laid one mile from the center of the town. By 1896, San Marcos was a community with its own stores, post office, blacksmith, and railroad depot. The first school in the area, which was started in Barham in 1886, had been moved to San Marcos three years later, as Barham was fading due to its distance from the railroad. To prevent San Marcos from suffering a similar fate, in 1903 the people of the town picked up their homes and moved a couple miles east along the railroad tracks to what now are Mission Road and Pico Avenue. By 1905, the town had every convenience, including rural mail delivery and telephone service. Later that same year, the Richland School (now a wedding chapel on Woodland Avenue) was built, becoming the second school in San Marcos. The main business in San Marcos in the 19th and early 20th centuries was farming. In the mid-20th century, dairies and poultry production became a big part of the business in the town.
San Marcos experienced a period of growth from 1956 onward, when the first water from the Colorado River arrived. Several small businesses were founded and the population rapidly increased to 2,500. San Marcos became an incorporated city on January 28, 1963. In the 1970s, San Marcos was flourishing as the third fastest-growing city in the state, and had a population of 17,479 by 1980. The population continued to boom over the next two decades, surpassing 30,000 in 1990 and nearing 85,000 by 2010.