Rancho San Francisco de las Llagas was a 22,283-acre (90.18 km2) Mexican land grant in present-day Santa Clara County, California given in 1834 by Governor José Figueroa to Carlos Antonio Castro. The grant extended along Llagas Creek from about one mile south of present-day Morgan Hill to about one mile north of Gilroy, and included present-day San Martin.
Carlos Antonio Castro (b.1775) was the son of Joaquin Ysidro de Castro and Maria Marina Botiller, who had come to California from Mexico with the De Anza Expedition in 1775. Carlos' brother, José Mariano Castro (1765–1828) was the grantee of Rancho Las Animas; his brother José Joaquín Castro (1768–1838) was the grantee of Rancho San Andrés; and his brother Francisco María Castro (1770 - 1831) was the grantee of Rancho San Pablo. Carlos Antonio Castro married María de Rosario García (b. 1779) in 1805. Their son Guillermo Castro was the grantee of Rancho San Lorenzo. In 1812, Carlos Castro was mayor domo of Mission Santa Cruz, and received the six square league Rancho San Francisco de las Llagas grant in 1834.
In 1848, the heirs of Carlos Castro sold Rancho San Francisco de las Llagas to Martin Murphy's sons Daniel and Bernard. Martin Murphy had brought his family to California with the Stephens-Townsend-Murphy Party in 1844. Martin Murphy purchased Rancho Ojo del Agua de la Coche to the north of Rancho San Francisco de las Llagas in 1846.