Pernik is a city in western Bulgaria (about 20 kilometres (12 miles) south-west of Sofia) with a population of 80,191 as of 2011. Pernik is the most populated city in western Bulgaria after Sofia. It is the main city ofPernik Province and lies on both banks of the Struma River in the Pernik Valley between the Golo Bardo, Vitosha,Lyulin and Viskyar mountains. Pernik is the main city of Pernik Province - province in western Bulgaria, neighbouring Serbia. Originally the site of a Thracian fortress founded in the 4th century BC, and later a Roman settlement, Pernik became part of the Bulgarian Empire in the early 9th century as an important fortress. The name Pernik is thought to have originated from that of Slavic god Perun and was first mentioned in the 9th century. The medieval town was a key Bulgarian stronghold during Bulgarian tsar Samuils wars against the Byzantine Empire in the 11th century, when it was governed by the local noble Krakra of Pernik, withstanding Byzantine sieges a number of times. From 1396 until 1878 the city was under Ottoman rule. In the 20th century Pernik developed rapidly as a centre for coal mining and heavy industry. During the Communist rule of Bulgaria it was called Dimitrovo between 1949 and 1962 after Bulgarian Communist leader Georgi Dimitrov. The Surva International Festival of the Masquerade Games is held in the city every January. Surva is International Kukeri Festival in Pernik, Bulgaria. One of the biggest masquerade festival on the Balkans and Eastern Europe. Conducted in the last three days of January. Economically Pernik is industrial town. Industry is of vital importance for the economy of the province. Pernik is the major manufacturing centre, one of the largest in the country with the Stomana steel complex; heavy machinery (mining and industrial equipment); brown coals, building materials and textiles being the most important. Near Pernik there is an enormous plant for heavy machinery in smaller town Radomir which produces excavators and industrial equipment, but is currently not working at full capacity. Pernik has two football teams, PFC Minyor Pernik and FC Metalurg Pernik. Pernik is the second largest town in western Bulgaria. The town is located in the Pernik Valley at an altitude between 700 and 850 metres (2,297 and 2,789 feet), length of 22 kilometres (14 miles) and is surrounded by mountains Vitosha, Lyulin and Golo Bardo. Through the city flows the river Struma, which rises from Cherni Vrah - one of the largest rivers in the country with a total length of 290 km (180 mi). Pernik is situated 30 kilometres (19 miles) southwest of the Bulgarian capital, Sofia. The territory of the town has many major roads, including Pan-European Corridor VIII and Pan-European Corridor IV - European route E79 /with Struma motorway and Lyulin motorway/, which connects Central Europe and Greece. Pernik has five railway stations and railway stops. The town lies close to one of the oldest trade routes in the Balkans, which ran from Sofia to Dubrovnik, via Skopje, Pristina, Sarajevo and Mostar.