Sophia of Halshany (c1405-1451)

Sophia of Halshany or Sonka Olshanskaya (Соф'я Гальшанская}}; Sofija Alšėniškė; Zofia Holszańska; c. 1405 – September 21, 1461 in Kraków) was a Grand Duchy of Lithuania princess of Halshany. As the fourth and last wife of Jogaila, King of Poland and Supreme Duke of Lithuania, she was Queen consort of Poland (1422–1434). As the mother of Władysław III, King of Poland and Hungary, and Casimir IV, Grand Duke of Lithuania and King of Poland, she was the founder of the Jagiellon dynasty.

Early life and marriage to Jogaila
Sophia was a middle daughter of Andrew Olshansky, son of Vytautas' right-hand man Ivan Olshansky, and Alexandra Drucka, daughter of Dmitry of Druck. Historians disagree on the identity of Dmitry: Polish historiography usually provides Jogaila's half-brother Dmitry I Starshiy while Russian historians provide Dimitri Semenovich of Rurikid origin. Her father died when she was young and the family moved to Druck to live with Alexandra's brother Siemion Drucki. Sophia grew up in a Ruthenian environment and was an Eastern Orthodox Christian (her Orthodox name is Sonka). It is believed that she was illiterate and largely uneducated.

It is unknown when Sophia met Jogaila for the first time. It is known that they met in the winter of 1420–1421 when Jogaila visited Druck. At the time Sophia was still a teenager, while Jogaila was around 60 or 70 and widowed three times (most recently in May 1420 when Elizabeth Granowska died). He had only one surviving daughter, Hedwig Jagiellon, and no male heir. Their marriage was supported by Siemion Drucki, her uncle, and Vytautas, her aunt's husband, but opposed by Polish nobility and Sigismund, Holy Roman Emperor, who proposed marriage to his brother's widow Sophia of Bavaria.

According to a custom, it would be a disgrace if a younger sister would marry before the elder sister. Therefore, Sophia's older sister Vasilisa was married off to Ivan Bielski, son of Jogaila's half-brother Vladimir Olgerdovich, in 1421. In February 1422, Sophia was baptized in the Roman Catholic rite (Sophia is her Catholic baptismal name). The wedding ceremony, carried out by Matthias of Trakai, Bishop of Samogitia, took place in Navahrudak on February 7 or 24. However, her coronation as Queen of Poland took place two years later, on March 5, 1424. This delay is explained by resistance from the Polish nobility and rather distant relationship between Sophia and Jogaila.

Wife of Jogaila
In March 1422, Sophia moved to the Wawel Castle in Kraków. There she was met with hostility by supporters of Emperor Sigismund and Princess Hedwig, particularly Zbigniew Oleśnicki, the Tęczyński and Tarnowski families. For a year, the couple spent time mostly apart: Jogaila traveled to Prussia for the Gollub War, to Lithuania to spend the winter, to Hungary for negotiations with Emperor Sigismund while Sophia stayed in Kraków. Alone in a foreign and hostile court, Sophia wrote letters to Jogaila expressing her unhappiness. Only in April 1423, Jogaila took Sophia to a trip to Russia. It is likely that the relationship grew closer during that journey as Jogaila took active steps to have Sophia crowned as the queen by Archbishop of Gniezno Wojciech Jastrzębiec. Coronation festivities in March 1424 lasted five days. Sophia received the villages of Stara Zagość and Bogucice Pierwsze as well as 20,000 grzywnas of Prague groschen.

On the night of October 30–31, 1424, she gave birth to Władysław III of Poland, the first male heir born in Poland in 114 years. The son substantially raised Sophia's prestige and political influence in Poland. The parents soon became engulfed in a political power struggle to ensure Władysław's succession. Polish nobility claimed that Jogaila's claim to the throne was not hereditary and that a new king should be elected by the nobles. Congresses in Brest (April 1425) and Łęczyca (May 1426), the nobles declared that Władysław would inherit only if he confirmed certain noble freedoms and refused proposal for Sophia's regency. Jogaila disagreed with such a decision and continued to campaign.

On May 16, 1426, in Kraków Sophia gave birth to Casimir, second son of Jogaila. However, the boy died on March 2, 1427. These dates, provided in historical sources, contradict a 1950 study of Casimir's skeleton which found that the bones are of an approximately 18-month-old boy. In spring 1427, while pregnant with the third child, Sophia was accused of marital infidelity, therefore casting a doubt over Władysław's and yet-unborn Casimir's paternity. Two of her servants were arrested and tortured and seven men were named as Sophia's lovers: treasurer Hińcza of Rogów, Piotr Kurowski, Wawrzyniec Zaręba, Jan Kraska, Jan Koniecpolski, brothers Piotr and Dobiesław of Szczekociny. The case went before a court. After the birth of her third son, Sophia took an oath before the court that she was innocent and the case was dismissed. Despite the scandal which dragged on for several months, the paternity of Sophia's children was never questioned again.

On November 29 or 30, 1427, Sophia gave birth to Casimir IV Jagiellon. The royal couple continued to work to assure their sons' rights to the Polish throne. In fall 1428, the couple traveled to Lithuania perhaps to support the plan to obtain royal crown of Lithuania to Grand Duke Vytautas. Elderly Vytautas had no heir and his crown would have passed to Jogaila and his sons. If Polish nobility wanted to preserve the Polish–Lithuanian union, they would be forced to elect Jogaila's sons to the Polish throne. Historians summed up this strategy as "through hereditary Lithuania to hereditary Poland." However, the plan was vehemently opposed by Polish nobles while Vytautas insisted on being crowned. In the end, Jogaila caved in. During a congress in Jedlnia in March 1430, he accepted nobility's declaration that Władysław would inherit only if he confirmed certain privileges for the nobility and that Sophia would not be a regent. Vytautas died in October 1430. Succession disputes in Lithuania led to the Lithuanian Civil War (1431–35) and Polish–Teutonic War (1431–35). That collapsed the strategy to secure hereditary rights in Poland through Lithuania and, in January 1433, Jogaila confirmed resolutions of the congress in Jedlnia. The Polish kings, even from the same dynasty, had to be elected by the nobles.

In December 1431, Princess Hedwig Jagiellon, betrothed to Frederick II, Elector of Brandenburg, died of a year-long illness. Sophia was accused of poisoning her step daughter to remove her from succession disputes. Again, Sophia had to give an oath professing her innocence.

Queen mother
On June 1, 1434, Jogaila died in Horodok. The power was seized by Bishop Zbigniew Oleśnicki and his supporters. On July 25, 1434, following the decisions of the Jedlnia congress, ten-year-old Władysław III of Poland was crowned as the King of Poland. The regency was entrusted to the royal council, and not directly to either Sophia and Oleśnicki who continued to struggle for the influence in the council. In summer 1435, Sophia helped Iliaș of Moldavia, husband of her youngest sister, escape a Polish prison and regain power in Moldavia. Iliaș swore fealty to Władysław and Moldavia paid a tribute to Poland. She also supported a project to betroth Władysław and Anne, Duchess of Luxembourg, who was at the time heiress to the Kingdom of Hungary and Bohemia. However, the project fell through.

After the death of Sigismund, Holy Roman Emperor, Bohemian nobility, mainly Hussites opposing Albert of Austria, elected Casimir IV Jagiellon as their king in March 1438 in Chrudim. It is not known whether Sophia took any action to facilitate this election, but she was generally supportive of the Hussites while Oleśnicki strongly opposed them. In fall 1438, Polish army invaded Bohemia. However, the campaign was poorly organized and, after the defeat of Casimir's supporters in Želenice, the army returned to Poland in October 1438. In December 1438, Polish nobles gathered in Piotrków Trybunalski and proclaimed 14-year-old Władysław to have attained the age of majority. That officially dissolved the regency, but did not strengthen Sophia's position against Oleśnicki. She actively took part in organizing a confederation "for protection of the king and order in the kingdom," which opposed Oleśnicki and supported Hussites, in Nowy Korczyn. The confederation, led by Spytek of Melsztyn, was defeated in the Battle of Grotniki.

After the death of Albert in October 1439, Hungarian nobles elected Władysław as their king. Sophia escorted Władysław to the Hungarian border. They said goodbye on April 22, 1440 in Czorsztyn. It was the last time Sophia saw her eldest son. In March 1440, Sigismund Kęstutaitis, Grand Duke of Lithuania, was murdered. With Władysław in Hungary, Lithuanian nobles, led by Jonas Goštautas, invited Casimir to Vilnius and elected him as the Grand Duke. Sophia remained in Poland and devoted the next four years to the Sanok Land and Sanok Castle. Reportedly, she was a capable administrator and earned respect from local residents. However, income from the land did not support her royal lifestyle and she accumulated some debts.

Władysław was killed in the Battle of Varna on November 10, 1444. The news propelled Sophia back into the national politics. In April 1445, she participated in the congress in Sieradz where Polish nobles elected Casimir as their king. However, Casimir was not eager to claim the throne and refused to travel to Poland. Sophia traveled to Lithuania where she met Casimir, after a separation of five years, in Hrodna in October 1445. Casimir refused to come to Poland and for the next two years Sophia acted as an intermediary between Casimir and Polish nobles. In 1466, Polish nobles selected Bolesław IV of Warsaw as their king if Casimir refused. Sophia once again sent envoys to her son who finally agreed to become the king. According to Jan Długosz, Sophia's motherly pleas convinced nobles to confirm Casimir as their king in Nowy Korczyn despite Oleśnicki's support to Bolesław. On June 25, 1447, Casimir was crowned King of Poland.

As the new king, Casimir isolated Oleśnicki from power, but allowed Sophia to participate in the royal council. She accompanied Casimir in his travels and continued to influence his decisions. Casimir supported Sophia's nephews, Roman II and Alexăndrel of Moldavia. Her influence decreased significantly after Casimir married Elisabeth of Habsburg in 1454. Her last known political action was sending envoy to newly elected Pope Pius II to find out his opinions on the Polish–Teutonic War (1454–66).

According to Długosz, Sophia became ill after eating too many melons and refused treatment. The illness worsened and she was paralyzed. She died on September 21, 1461. She was buried in the Holy Trinity Chapel of the Wawel Cathedral. She had funded construction and decoration of the chapel in 1431–1432. At the time of her death, she had four grandsons and one granddaughter.

Sophia sponsored a translation of the Bible into the Polish language (1453–1461). Even though the translation was not completed, the work, known as Bible of Queen Sophia, is an important monument of the Polish language.