Vladislaus Jagiełło (Lithuanian name Jogaila), founder of a new dynasty on the throne of Poland called the Jagiellons or Jagiellonians after him, was a Lithuanian. He ascended the Polish throne on the grounds of a Polish-Lithuanian Union signed at Krewo in 1385. As a result of the union, he became King of Poland, married Jadwiga of Anjou (twenty-three years his junior), was converted to Christianity (in the Roman rite) and pledged to liberate Pomerania from the hands of the Order of the Holy Virgin Mary of the Teutonic House, better known as the Teutonic Order. The Order had been invited to those territories in 1226 by Conrad of Mazovia, a Polish prince lured by their offer of help in converting the pagan Prussians to Christianity, but once settled there never intended to leave the lands along the Baltic coast (Gdańskian Pomerania) which had belonged to Poland for centuries.
The Teutonic Order, at that time a formidable military power in Europe, proved a threat to both Poland and Lithuania. The Teutonic Knights had seized the Polish Baltic coast, all the time expanding their influence further inland, and at the same time attacked territories belonging to Lithuania, attempting to conquer and capture Samogitia. When they finally did manage to snatch some Lithuanian territory in 1404, it became clear that war was imminent. Therefore, after yet another uprising in Samogitia, Poland decided to assist Lithuania. Preparation for the decisive campaign lasted the entire winter of 1409/1410. The Teutonic Order carried out a widespread anti-Polish and anti-Lithuanian campaign throughout Europe, calling on knights to join them in a crusade against "pagans". Lithuania, after all, had adopted Christianity only in 1386 and there had been opposition from part of the population.
Hostilities began in June and lasted until 10 July 1410. On that day, the two huge armies confronted each other outside the small village of Grunwald (now in northern Poland; centuries later, during the First World War, the Battle of Tannenberg was fought not far from the medieval battlefield and sometimes the names are confused). Thirty thousand Teutonic knights under the command of the Grand Master Ulrich von Jungingen, supported by knights from nearly twenty European countries, were opposed by a Polish-Lithuanian army of similar strength, with a detachment of Tartars sent by the Hospodar of Moldavia, under the command of the King of Poland and his cousin Witold (Vytautas), who acted in the capacity of Grand Duke of Lithuania. Despite the shortage of armour and training (most of the Lithuanian and Tartar forces were composed of light cavalry), the united forces routed their opponents thanks to Jagiełło's astute tactics and the courage of the Polish knights. The might of the Teutonic Order was crushed, and most of the knights of the Order either killed or taken prisoner. Jagiełło's forces captured all fifty-two Teutonic standards. The dangerous Teutonic Order never managed to recuperate from this defeat. Under the peace treaty signed in Toruń in 1411, Lithuania regained Samogitia, while Poland won back part of Pomerania.
The brilliant victory strengthened Jagiełło's position in Poland, yet after the death of his wife Jadwiga, who, as grand-daughter of Vladislaus the Ell-High, had an undeniable right to the Polish throne, in 1413 Jagiełło, who had no such rights by descent, signed another treaty of union with the Polish nobility at Horodło to protect his own interests as well as those of his descendants. Under this agreement, Poland and Lithuania were to remain two separate entities, joined solely by the person of the monarch, at the same time keeping separate political systems, treasuries, armies and the scope of privileges for the nobility and the boyars. Thus Jagiełło secured the Lithuanian succession for his descendants irrespectively of whatever might have happened in Poland. Jagiełło's heir was finally born in 1424 from the King's fourth marriage, at seventy, to the seventeen-year-old Princess Zofia (Sonka) Holszańska. In 1425, in order to secure the Polish throne for young Vladislaus, Jagiełło made further concessions, signing an agreement in Brześć, in which he confirmed the privileges of the Polish nobility.
Jagiełło remained extremely active until his final days; according to historians, he loved hunting and camping out, ate simple meals, drank only water and avoided alcoholic beverages. He died on 1 June 1434 at the age of eighty-three, of pneumonia, which he contracted at Medyka (near Przemyśl), while staying out of doors to listen to a bird song late at night.