Charles IV allotted Lubin along with Krzeczyn Wielki, Krzeczyn Mały, Osiek and Pieszków to Louis. About 1353 he had a manuscript on the life of Saint Hedwig of Andechs drawn up, later called Schlackenwerth (Ostrov) Codex, which today is kept at the J. Paul Getty Museum. The Castle Chapel in Lubin dates to the 14th century. In the late 15th century the Lubin parish church was rebuilt in its present-day Gothic style, its high altar was moved to Wrocław Cathedral in 1951. Under the rule of Duke George I of Brieg (died 1521) and his widow Anna of Pomerania, the reformer Caspar Schwenckfeld, born in nearby Osiek, made the town a centre of the Protestant Reformation in Lower Silesia. With Bohemian Silesia, Lubin in 1526 fell under suzerainty of the Habsburg monarchy. It was devastated several times during the Thirty Years' War. Lubin remained part of the Piast-ruled Duchy of Legnica until 1675, when it was incorporated to the Habsburg-ruled Bohemia. Conquered in the Silesian Wars by King Frederick II of Prussia in the mid-18th century, the town became a part of Prussia and later, in 1871, Germany. In 1871, after creation of the German Empire, it was connected by rail to Legnica (Liegnitz) and Głogów (Glogau). In reports on their parishes at the end of the 18th century, local pastors wrote about native Poles, who spoke a local dialect of the Polish language. The native Polish population was subjected to planned Germanisation, which lasted until the 1930s. A labour camp of the Reich Labour Service was operated in the town under Nazi Germany. During World War II about 70% of the town's buildings were destroyed. In 1945 between the days of 8–10 February Red Army soldiers mass-murdered 150 German pensioners in an old-people's home and 500 psychiatric hospital patients in Lubin. The city eventually became again part of Poland, although with a Soviet-installed communist regime, which stayed in power until the 1980s. The remaining German population of the city was either expelled in accordance with the Potsdam Agreement, or prohibited from returning home by the communist authorities. In 1957 Jan Wyżykowski discovered and in 1959 documented in Lubin the largest copper ore deposits in Europe and one of the largest in the world. Soon copper mines were built and the KGHM company was established. From 1975 to 1998 it belonged to the former Legnica Voivodeship. In 1982 the city