The town's name derived from the Prince-Bishops of Warmia, who had a castle built in the southeastern outskirts of their realm on the Dymer creek in the late 14th century. The fortress was first mentioned in a 1389 deed, the settlement that had developed nearby received town privileges according to Kulm law by Bishop Henry III Sorbom in 1395. The town sided with the Prussian Confederation, at the request of which King Casimir IV Jagiellon signed the act of incorporation of the region to Poland in 1454. The town and castle were devastated during the subsequent Thirteen Years' War between the rebellious Prussian Confederation and the State of the Teutonic Order, and with Warmia passed to the Lands of the Polish Crown according to the Second Peace of Thorn in 1466. Again demolished during the Polish–Teutonic War, the Polish–Swedish War and the Second Northern War, the development of the town was often hampered not only by warfare, but also by blazes, plague and famine. With the First Partition of Poland in 1772, Bischofsburg was annexed by the Kingdom of Prussia and a year later incorporated into the newly established Province of East Prussia. The town's population was overwhelmingly Polish. According to the 1797 report of the local priest, of the 200 children attending religious education, only 20 were learning German. From 1862 until 1945, it was the seat of Landkreis Rößel, from 1871 part of the German Empire. In 1882, in response to the Germanisation attempts of the authorities, a Polish library was established in the town. According to the 1897 data, 75% of children in the district, as well as in the whole southern Warmia region, spoke Polish. After the German defeat in World War I the 1920 East Prussian plebiscite held in the town resulted in 3461 against 52 votes cast for Germany. Bischofsburg was again 50% destroyed during the East Prussian Offensive of the Red Army in the late days of World War II. In 1945 the town was transferred, along with all of Warmia, to Poland according to the resolutions at the Potsdam Conference. Its remaining German population was expelled and the name changed to the historic Biskupiec. Despite its numerous devastations, the medieval city's layout has been largely preserved. The town's landmark is its 16th century Gothic Church dedicated to Saint John the Baptist, erected from 1505 onwards on the behest of Prince-Bishop Lucas Watzenrode and consecrated in 1580 by Prince-Bishop Marcin Kromer.