At the end of the century Silesia became part of Poland and was ruled by the Piast dynasty; the land of the pagan Opolanie was conquered by Duke Mieszko I in 992. From the 11th–12th centuries it was also a castellany. After the death of Duke Władysław II the Exile, Silesia was divided in 1163 between two Piast lines – the Wrocław line in Lower Silesia and the Opole-Racibórz of Upper Silesia. Opole would become a duchy in 1172 and would share much in common with the Duchy of Racibórz, with which it was often combined. In 1281 Upper Silesia was divided further between the heirs of the dukes. The Duchy of Opole was temporarily reestablished in 1290.