Sophia of Hungary

Sophia of Hungary (c. 1050 – 18 June 1095), a member of the royal Árpád dynasty, was a Margravine of Istria and Carniola from about 1062 until 1070, by her first marriage with Margrave Ulric I, as well as Duchess of Saxony from 1072 until her death, by her second marriage with Duke Magnus Billung.

Life
Sophia was the daughter of King Béla I of Hungary (c. 1020 – 1063) and his consort Richeza of Poland. Her father, ruler in the former Principality of Nitra at the time of her birth, fled to Poland during dynastical struggles with his brother King Andrew I. In 1060 he returned to Hungary and, with Polish support, assumed the throne at Esztergom.

Béla's daughter Sophia initially was engaged to Margrave William of Meissen, who had been sent to Hungary with an Imperial army by Dowager Empress Agnes of Poitou. William was arrested by Béla, who nevertheless admired his bravery. However, he died unexpectedly in 1062, before he could marry Sophia. She then married his nephew Margrave Ulric I of Carniola. Her husband, a loyal supporter of the German royal Salian dynasty, made use of his excellent contacts with the Hungarian ruler and enlarged his Istrian territories against the resistance of the Patriarchs of Aquileia and the Republic of Venice. By 1063, he held extended estates along the Adriatic coast down to Fiume (Rijeka) which later were elevated to the Duchy of Merania; his possessions were officially confirmed by King Henry IV of Germany.

After Ulrich's death in 1070, Sophia married the Billung prince Magnus (d. 1106), son of Duke Ordulf of Saxony. Magnus supported the rebellious Saxon count Otto of Nordheim and was arrested by the forces of King Henry IV; he even remained in captivity when he succeeded his father as duke in 1072. Not until August 1073, during the Saxon Rebellion, he was released from custody at Harzburg Castle. He later participated in the Great Saxon Revolt, but finally reconciled with King Henry.

Issue
From her first marriage with Ulric, she had the following children:
 * Ulric II, Margrave of Carniola (d. 1112), married Adelaide of Thuringia (d. 1146)
 * Poppo II, Margrave of Carniola (d. 1098), married Richgard (d. 1130), the daughter of Count Engelbert I of Spanheim
 * Richardis, married Count Otto II of Scheyern (d. c. 1110)
 * Adelaide (d. 1122), married firstly Frederick II of Diessen, bailiff (Vogt) of the Regensburg cathedral chapter, and secondly Count Udalschalk of Lurngau (d. 1115), a member of the Grögling-Hirschberg family
 * Walburga

From her second marriage with Magnus, she had two daughters:
 * Wulfhilde (d. 29 December 1126 in Altdorf, buried in Weingarten), married Duke Henry IX "the Black" of Bavaria (d. 1126), a member of the House of Welf
 * Eilika (d. 18 January 1142), married Count Otto of Ballenstedt (d. 9 February 1123), a member of the House of Ascania who in 1122 became Duke of Saxony.