The location of Lublin at the eastern borders of the Polish lands gave it military significance. During the first half of the 13th century, Lublin was a target of attacks by Mongols, Tatars, Ruthenians, and Lithuanians, which resulted in its destruction. It was also ruled by Kingdom of Galicia–Volhynia between 1289 and 1302. Lublin was founded as a town by Władysław I the Elbow-high or between 1258 and 1279 during the rule of the prince Bolesław V the Chaste. Casimir III the Great, appreciating the site's strategic importance, built a masonry castle in 1341 and encircled the city with defensive walls. From 1326, if not earlier, the stronghold on Castle Hill included a chapel in honor of the Holy Trinity. A stone church dating to 1335–1370 exists to this day.
The location of Lublin at the eastern borders of the Polish lands gave it military significance. During the first half of the 13th century, Lublin was a target of attacks by Mongols, Tatars, Ruthenians, and Lithuanians, which resulted in its destruction. It was also ruled by Kingdom of Galicia–Volhynia between 1289 and 1302. Lublin was founded as a town by Władysław I the Elbow-high or between 1258 and 1279 during the rule of the prince Bolesław V the Chaste. Casimir III the Great, appreciating the site's strategic importance, built a masonry castle in 1341 and encircled the city with defensive walls From 1326, if not earlier, the stronghold on Castle Hill included a chapel in honor of the Holy Trinity. A stone church dating to 1335–1370 exists to this day.