In the early 13th century, Duke Casimir I of Opole decided to move the settlement from the Pasieka Island into the right shore of the Oder river (since the 17th century it is the old stream bed of Oder known as Młynówka). All of the inhabitants had to be moved in order to make place for the castle that was eventually built in the place of the old city. Former inhabitants of Ostrówek together with German merchants that immigrated here from the West, received first town rights probably as early as around 1217, although this date is disputed. Opole received German town law in 1254, which was expanded with Neumarkt law in 1327. Opole developed during the rule of duke Bolko I of Opole. In this time the castle was finally completed and new buildings, including the city walls and the Holy Cross Church, were constructed.