The origins of the first settlement are connected with the town being granted Magdeburg Rights in 1217 by Casimir I of Opole, the great-grandson of Polish Duke Bolesław III Wrymouth. During the Medieval Period and the Renaissance the city was known as a centre of commerce due to its position on the intersection of several main trade routes, which helped to generate steady profits from transit trade. The rapid development of the town was also caused by the establishment of a seat of regency in Opole in 1816. The first railway connection between Oppeln, Brieg and Breslau was opened in 1843 and the first manufacturing plants were constructed in 1859, which greatly contributed to the city's regional significance.