The picturesque Škofja Loka, proudly standing at the confluence of Poljanska and Selška Sora rivers at the crossing of Sorško polje field into the diverse world of the hills of Škofja Loka and Polhov Gradec, is the best preserved medieval town in Slovenia and the economic, cultural, educational and administrative center of the Škofja Loka municipality.
Archaeological findings indicate that the territory of Škofja Loka has been inhabited since the Copper Age (4th and 3rd millennium BC) onwards. At the time of the great migration of peoples, the Slavic inhabitants settled here, since the settlements carried Slavic names even before the granting of the territory to the bishops of Freising.
The history of the city begins with the year 973, when Emperor Otto II. donated the local territory to Bishop Abraham of Freising in Bavaria. However, Loka, named in the gift certificate, is not today's Škofja Loka, but so-called Stara Loka. At the confluence of the Selška and Poljanska Sora rivers, the settlement Loka began to develop in the Middle Ages (the name stands for the grassy area by the water). Freising's bishops later renamed the administrative and economic center of the Loka’s lordship into Škofja Loka (Bischoflack). In the 1274 document, the settlement was named as a city. For the sake of greater security, the city was protected with a town wall at the beginning of the 14th century. Five gates led through that wall and they were protected by guard towers and are preserved to a great extent to this day. In its history, the city experienced attacks, plagues, fires and earthquakes. The worst, in 1511, severely damaged the city, which was soon restored by Bishop Philip. Since then, the image of Škofja Loka has not changed significantly, therefore it is considered the best-preserved medieval town in Slovenia. The old town center is formed by the Upper Town Square or “Plac” and the Lower Town Market or “Lontrg”, above which the Škofja Loka castle arises. The population of the city and its surroundings was engaged in numerous crafts, from which strong craft associations - guilds - developed towards the end of the Middle Age.
In the natural and artistic rich environment of Škofja Loka, a number of renowned artists, writers and scientists have been active, and they managed to create a rich cultural heritage of Škofja Loka.