El Espinar is a Spanish population centre and a municipality located 65 kilometres (40.38 mi) away northwest from Madrid city centre, in the northern slope of the Sistema Central mountain range. It belongs to the province of Segovia and to the autonomous Community of Castile and León. The distance from the city of Segovia is 34 kilometres (21.12 mi).

According to the 2025 census (INE), the municipality has 10,409 inhabitants, being 5,258 men and 5,151 women.

The municipality has four population centres that are physically separate from one another: El Espinar. San Rafael. La Estación de El Espinar. Los Ángeles de San Rafael.

The population centre of El Espinar, the oldest and the most populated one, gives the name to the entire local territory and has the municipality hall's headquarters. As of 2024, these 10,145 inhabitants are roughly distributed in the municipality as follows: 50% of population live in El Espinar, 25% in San Rafael, 15% in Los Ángeles de San Rafael and 10% in La Estación de El Espinar.

The municipality is not part of Madrid metropolitan area, but is not far away from it because its outer ring begins just heading 25 kilometres southeast in Collado Villalba. However, the municipality of El Espinar is part of Madrid's functional urban area as more than 15% of the inhabitants commute daily in Madrid.

History

The documented history of El Espinar dates from the 11th century, even though the area has been inhabited since the Iron Age. In fact, in September 2016 was found the settlement of Canto Los Hierros in a nearby mountain located south of town, just at 1,700 metres above sea level. The settlement, dated back to the Iron Age and later reused and expanded by the Romans, covered about 70 hectares and included about 100 houses, few traces of walls and quite a lot of iron items. This kind of ancient settlement at such a high altitude is considered unique within Europe.

Before the arriving of the Romans, the area known today as the municipality of El Espinar probably was in the very eastern limit of the vettones territory.

During the rule of the Visigothic Kingdom, the area was not known as El Espinar, but as Gudillos, and then during the rule of Al-Andalus it received the name of Albarrana.

In 1293 received the foundation document called as Carta Puebla, which made the area independent from the city of Segovia and therefore received city rights. The Carta Puebla was renewed later in 1317 and in 1368, which allowed the municipality to increase its territory.

El Espinar played a crucial role during the Revolt of the Comuneros as a guerrilla warfare unit of nearly 2,000 men gathered by the leader rebel Juan Bravo moved to Segovia to support the rebels as the royalist armies had started to suffocate the comuneros rebellion.

During the 18th century, both the economy and the population boosted because of the sheep wool production and for the replacement of the farthest mountain pass of La Fuenfría by the nearest one of Guadarrama Pass as the safest, main mountain pass to travel between Madrid and the northwestern quadrant of the Iberian Peninsula. In 1888, the railway between Madrid and Segovia was built, so the area experienced a boost as less time was needed to travel from El Espinar to both Madrid and Segovia.

In the early 20th century, El Espinar became more famous for people from Madrid as a place to spend summer holidays whilst keeping away from the hotter Madrid's summers. From 1936 to 1939, the eastern limit of the council by the Guadarrama pass became a key frontline during the Spanish Civil War. Because of that reason, nowadays the area is famous for the several bunkers and becoming a popular destination for people who like to follow the traces of war. During the early 21st century, the town increased its population as people from Madrid moved to the area to live permanently there whilst working elsewhere in Madrid as commuters. Living there as remote online workers and moving only one day per week to Madrid city centre is also a growing fast trend.

Geography, hydrography and climate

Geography El Espinar is in the south of Segovia province. It is embedded by the mountains of the Sistema Central by the north, the east and the south, and only the west and the northwest are partially open to the lower lands of the high northern plateau.

The altitude from the entire local territory range from 2,197 metres at the peak of La Pinareja mountain to 1,050 metres above sea level by the Moros valley when leaving the local territory heading northwest, although the inhabited areas are located between 1,100 and 1,200 metres above sea level. From the top of the mountains located at the eastern limit of the local territory, the high southern plateau, the skyline of Madrid and most of its western metropolitan area are easily seen during clear days. From the mountains located at the western and northern limits, there is a great view of the high northern plateau, whereas from those ones located at the southwest the Gredos mountains can be seen as well.

The three highest mountains are in the northeast: La Pinareja (2,197 m), Peña del Oso (2,196 m) and Montón de Trigo (2,161 m). All the other peaks in the local territory are below 2,000 m, such as Cueva Valiente (1,904 m) and Cabeza Líjar (1,824 m) in the south, La Peñota (1,945 m) in the east and Caloco (1,567 m) in the west.

Hidrography

Rivers

Except for two small areas in the west that belong to both the Voltoya and the Cofio bassin areas, most of the local territory of the entire council is located in the upper Moros valley, so the Moros river is a tributary of the Eresma, then the Eresma is a tributary of the river Adaja, and finally the Adaja is a tributary of the Duero.

The river Moros runs from its source at the western slope of Montón de Trigo mountain heading southwest. Then it turns westward and runs along the northern boundary of La Estación de El Espinar and then turns northwest heading Los Ángeles de San Rafael, although it only fringes on the westernmost side of its built-up area.

The river Gudillos, which is the main tributary of the Moros within the local territory, has its headwaters near El Baldío area, not far from the western foothill of La Peñota mountain. Then it runs southwest until it reaches the northern side of the AP-6 motorway, and then turns west running parallel to the motorway, encompasses the northern boundary of San Rafael, keeps going parallel to the motorway and then, two kilometres northwest of San Rafael, turns northwest until it meets the Moros river just four kilometres southeast of Los Ángeles de San Rafael. Two brooks that are tributaries of the river Gudillos pass through the built-up area of San Rafael: The Mayor and the Gargantilla.

The population centre of El Espinar is not approached by neither the Moros nor the Gudillos. However, two small brooks run through its built-up area, just El Boquerón one from the southwest and Prado Goyato one from the southeast. These two brooks converge near the Arciprestre de Hita primary school and, from this spot onwards, a more substantial watercourse is created with the name of La Soledad, which runs north while leaving the built-up area and continues north as a tributary to the brook of La Tejera, and finally La Tejera meets the Moros river just three kilometres southeast of Los Ángeles de San Rafael.

Other There are three small dams along the upper Moros valley within the local territory: El Vado de Las Cabras with a surface area of 2 ha. El Tejo with a surface area of 11 ha. Los Ángeles with a surface area of 13 ha.

There are not lakes, but instead there are two small ponds near the Gudillos river; the first one near its headwaters, and the second one just 800 metres before joining the Moros river.

There are some beautiful human-made natural swimming pools in the wild named as La Panera, just by the Moros river in the middle of the pine forest. They are located about two kilometres east of La Estación de El Espinar.

The brook of El Boquerón has a three metres high waterfall that is located three kilometres southwest of El Espinar population centre.

There are more than 180 drinkable water springs within the territory of the entire local council and surrounding local councils.

Climate El Espinar has a mediterranean climate with strong continental influence because of its location in the centre of the Iberian Peninsula, and it is also modified by its high altitude.José Luis Rodríguez. Sierra de Madrid y Sistema Central. ISBN 9788496434165 According to the Köppen climate classification the inhabited areas have a Csb climate, therefore temperate with dry summers. There are not weather stations in the top of the mountains, but a Dsb climate, just a colder version with dry summers as well, should be expected up there above 1,900 metres as temperature decreases with altitude.

By November 2025, the four population centres of the municipality are well covered by six online weather stations, of which one public runs by Aemet and five private ones on Weather Underground run by weather enthusiasts.

Precipitation Summer is the driest season, as few thunderstorms by their convective cumulonimbus clouds bring rain showers during July and August; on the other hand, rain coming from not towering vertical clouds during summer almost never happen, but certainly the rest of the year.

Late autumn is the rainiest season, whereas mid-spring is slightly less rainy. Late winter is a little bit dry than autumn and spring months, but is not bone dry like summer. Wettest yearly average precipitation range from 700 to 1,000 mm, and driest ones range from 400 to 600 mm. Severe drought extending beyond summer months is not unheard of during driest years. Unlike in the surrounding lower lands, as mid-spring in El Espinar tend to be a little bit rainier and colder, the grass usually keeps green until late May during dry late springs and to late June or even early July when late springs are rainier than average. Then, from late September onwards, when summer drought is over, the grass turns green again.

From late September to early May, the biggest amounts of precipitation usually occur with either south-easterlies and north-westerlies, whereas little or any precipitation at all should be expected with south-westerlies and north-easterlies. The reason for that is the Sistema Central mountain range that creates some rain shadow in the upper Moros valley, and therefore in almost the entire territory of the municipality. However, things are different in the nearby municipalities and valleys. For instance, in the Guadarrama valley around Collado Villalba, only 25 kilometres heading southeast, north-westerlies bring little precipitation, whereas in the Eresma valley around the city of Segovia, just 30 kilometres heading north, south-easterlies bring little precipitation as well.

Anyway, during summer, as rain showers are less common and usually occur during brief thunderstorms, such thunderstorms usually move from south to north. However, thunderstorms with heavy lightning, heavy wind gust and large hail, although rare, can occur and mainly move from the southeast to the northwest.

Snowfall can happen from late November to mid-April, rarely in late April and early May, and heavy snowfalls with snow depth up to 40 centimetres or more in a row usually happen at least once every three or four years. However, since 2014 onward, except for January 2018, February 2018 and January 2021, snowfalls and heavy frost are getting rare which can be a consequence of the climate change.

Temperature During mid-summer, average daily highs usually range from 27 °C to 30 °C, whereas average daily lows usually range from 12 °C to 14 °C.