Pernik is located in western Bulgaria, close to the city of Sofia. Its ancient history began eight millenia ago. The first settlement in the Pernik valley dates as far back as the Neolithic period when ancient tillers built a settlement in close proximity to the Struma river.
The first fortification with a fortified wall began after the middle of the 4th century B.C. An elite fortress was built with defensive towers and facilities, a castle complex and a sanctuary of god Dionysos. It played the part of a strategic, military and political, trade and cultural centre of the lands of Upper Struma. The Agrians, who populated these lands, were famous for their excellent mining skills and elite warriors. Their most famous king – Langar, was an ally to the Macedonian rulers Philip II and Alexander of Macedonia.
The fortress was destroyed several times by the invasions of Slavic, Avar tribes, etc.
A prerequisite for the future expansion of the settlement was the exploitation of stone coal in the region. In 1984 the first power station in Bulgaria was built in Pernik. Here the first electric light bulb in Bulgaria was lighted.
In 1929 Pernik was pronounced a city. Since 1995 the city of Pernik has been a member of the Foundation of European carnival cities, whose headquarter is in Amsterdam. Every even-numbered year, in the last weekend of January, an International Fair of the Masquerade Games takes place – a convention in which more than 3,000 people from different countries participate.