San Andrés del Rabanedo is a municipality located in the Province of León, Castile and León, Spain. According to the 2011 census (INE), the city has a population of 31,562 inhabitants, and is the third largest city in the province after León and Ponferrada. The municipality includes the districts of San Andrés del Rabanedo, Trobajo del Camino, Barrio Pinilla, Villabalter and Ferral del Bernesga.
San Andrés del Rabanedo is the second most-populated town in the comarca of Tierras de León where it is only exceeded in size by the capital city of León. It is situated in the valley of the River Bernesga which rises in the Cantabrian Mountains and flows southwards through the Province of León before its confluence with the River Esla. The valley is at an altitude of about 840 m (2,760 ft). There is a scarp slope parallel to the river which is cut by gullies in places, and above this is sloping moorland where cereals are grown. Above this again is an upland region at about 1,100 m (3,600 ft) with a natural covering of oak and pine.The city of León lies to the east and south of San Andrés del Rabanedo. To the southeast lies the municipality of Valverde de la Virgen, to the west lies Cimanes del Tejar, to the northwest Rioseco de Tapia and to the north, the municipalities of Sariegos and Cuadros. About one third of the municipality is occupied by the military base of Conde de Gazola and used for manoeuvres.
The municipality of San Andrés del Rabanedo has an area of 64.84 km2 (25.03 sq mi) and at the time of the 2011 census it had a population of 31,562, giving a density of 486.75 inhabitants per square kilometre. The population of the Province of León has grown since the start of the twentieth century but this has been a growth of urban populations at the expense of rural areas. San Andrés del Rabanedo has been one of the fastest growing towns; it increased its population by almost 24,000 people in the twentieth century and had gained another 4,000 by the year 2008.