Segovia was first recorded as a Celtic possession, with control eventually transferring into the hands of the Romans. The city is a possible site of the battle in 75 BCE where Metellus was victorious over the general of Sertorius, Hirtuleius. Hirtuleius died in the fighting.
During the Roman period the settlement belonged to one of numerous contemporary Latin convents. It is believed that the city was abandoned after the Islamic invasion of Spain centuries later. After the conquest of Toledo by Alfonso VI of León and Castile, the son of King Alfonso VI, Segovia began restocking with Christians from the north of the peninsula and beyond the Pyrenees, providing it with a significant sphere of influence whose boundaries crossed the Sierra de Guadarrama and the Tagus.
Segovia’s position on trading routes made it an important center of trade in wool and textiles. The end of the Middle Ages saw something of a golden age for Segovia, with a growing Jewish population and the creation of a foundation for a powerful cloth industry. Several splendid works of Gothic architecture were also completed during this period. Notably, Isabella I was proclaimed queen of Castile in the church of San Miguel de Segovia on December 13, 1474.
Like most Castilian textile centers, Segovia joined the Revolt of the Comuneros under the command of Juan Bravo. Despite the defeat of the Communities, the city’s resultant economic boom continued into the sixteenth century, its population rising to 27,000 in 1594. Then, as well as almost all the cities of Castile, Segovia entered a period of decline. Only a century later in 1694, the population had been reduced to only 8,000 inhabitants. In the early eighteenth century, Segovia attempted to revitalize its textile industry, with little success. In the second half of the century, Charles III made another attempt to revive the region’s commerce; it took the form of the Royal Segovian Wool Manufacturing Company (1763). However, the lack of competitiveness of production caused the crown withdraw its sponsorship in 1779. In 1764, the Royal School of Artillery, the first military academy in Spain, was opened. This academy remains present in the city today. In 1808, Segovia was sacked by French troops during the War of Independence. During the First Carlist War, troops under the command of Don Carlos unsuccessfully attacked the city. During the nineteenth and first half of the twentieth century, Segovia experienced a demographic recovery that was the result of relative economic stability.