The Duchy of Teschen (Herzogtum Teschen), also Duchy of Cieszyn (Księstwo Cieszyńskie) or Duchy of Těšín (Těšínské knížectví), was one of the Duchies of Silesia centered on Cieszyn (Teschen) in Upper Silesia. It was split off the Silesian Duchy of Opole and Racibórz in 1281 during the feudal division of Poland and was ruled by Silesian dukes of the Piast dynasty from 1290 until the line became extinct with the death of Duchess Elizabeth Lucretia in 1653. The ducal lands initially comprised former Lesser Polish territories east of the Biała River, which in about 1315 again split off as the Polish Duchy of Oświęcim, while the remaining duchy became a fiefdom of the Bohemian kings in 1327 and was incorporated into the Lands of the Bohemian Crown in 1348. While the bulk of Silesia was conquered by the Prussian king Frederick the Great in the Silesian Wars of 1740–1763, Teschen together with the duchies of Troppau (Opava), Krnov and Nysa remained with the Habsburg monarchy and merged into the Austrian Silesia crown land in 1849. The so-called "commander line" of the Habsburg-Lorraine dynasty, a cadet branch descending from Archduke Charles, Duke of Teschen, held the title "Duke of Teschen" until 1918. The duchy shared the history of the Cieszyn Silesia region, and also in part that of Silesia in general: the Teschen area was the south-easternmost part of the medieval Duchy of Silesia, a Polish province established upon the death of Duke Bolesław III Wrymouth in 1138. According to his testament, the Silesian lands were to be ruled by his eldest son Władysław II, who became the progenitor of the Silesian Piasts. Though he was exiled by his younger half-brothers after he had tried to gain control over Poland as a whole, his sons, backed by Emperor Frederick Barbarossa, were able to return and to secure their Silesian inheritance. In 1172 they divided the heritage: the Upper Silesian lands with the Cieszyn area stretching up to the Beskid Mountains fell to the second son Mieszko I Tanglefoot, who ruled as Duke of Racibórz.