structural:scholar_edition
Geography

Sofia City Province has an area of 1344 km, while the surrounding and much bigger Sofia Province is 7,059 km. Sofia's development as a significant settlement owes much to its central position in the Balkans. It is situated in western Bulgaria, at the northern foot of the Vitosha mountain, in the Sofia Valley that is surrounded by the Balkan mountains to the north. The valley has an average altitude of 550 metres (1,800 ft). Sofia is the second highest capital of the European Union (after Madrid) and the third highest capital of Europe (after Andorra la Vella and Madrid). Unlike most European capitals, Sofia does not straddle any large river, but is surrounded by comparatively high mountains on all sides. Three mountain passes lead to the city, which have been key roads since antiquity, Vitosha being the watershed between Black and Aegean Seas.

A number of shallow rivers cross the city, including the Boyanska, Vladayska and Perlovska. The Iskar River in its upper course flows near eastern Sofia. It takes its source in Rila, Bulgaria's highest mountain, and enters Sofia Valley near the village of German. The Iskar flows north toward the Balkan Mountains, passing between the eastern city suburbs, next to the main building and below the runways of Sofia Airport, and flows out of the Sofia Valley at the town of Novi Iskar, where the scenic Iskar Gorge begins.

The city is known for its 49 mineral and thermal springs. Artificial and dam lakes were built in the twentieth century.

While the 1818 and 1858 earthquakes were intense and destructive, the 2012 Pernik earthquake occurred west of Sofia with a moment magnitude of 5.6 and a much lower Mercalli intensity of VI (Strong). The 2014 Aegean Sea earthquake was also noticed in the city.