Dynastic turmoils in Hungary greatly weakened the royal power and resulted in the rise of powerful nobles at the beginning of the 13th century. Andrew II (1205-1235) was forced to issue the Golden Bull in 1222 giving nobility the right to disobey the king when acting against the law. The Golden Bull of 1222 also obliged the king to regularly convoke the diet and increased the power of nobility in the counties. Andrew’s successor Bela IV (1235-1270) tried limit the power of the magnates and to recover the lost crown-lands. However, his reign was marked by the Mongol invasion in 1241 and severe Hungarian defeat in the Battle of Mohi or Battle of the Sajo River in 1241. Bela IV fled to Dalmatia and appealed to Pope Gregory IX and to Holy Roman Emperor Frederick II for assistance against the Mongols. However, none of them responded to his appeal, while Hungary was meanwhile plundered by the Mongols.
The Mongols withdrew because of dynastic crisis in the Mongolian Empire in 1241. Bela IV returned to Hungary which was totally devastated, while western portions of the kingdom were seized by Frederick of Austria. The Hungarians were defeated by Frederick but the latter was killed in the battle at the Leitha River in 1246. The male line of the House of Babenberg became extinct on Frederick’s death but Bela was defeated by Ottokar II of Bohemia in their struggle for Frederick’s inheritance – the Duchies of Austria and Styria in 1260. Bela IV managed to repulse the second Mongolian invasion one year later but the last years of his rule were marked by struggles with his son Stephen V (1246-1272). The latter was crowned junior King and entrusted the government of Croatia, Slavonia and Dalmatia in 1246, and Transylvania in 1258. Stephen V ascended to the Hungarian throne on his father’s death but the deceased senior king entrusted his daughter Anna and his followers to Ottokar II of Bohemia. Ottokar II started a war against Stephen V but the Hungarian King decisively defeated his rival in 1271. He died suddenly in 1272 and was succeeded by his ten year old son Ladislaus IV (1272-1290). Ladislaus’ reign was marked by loss of royal power to the Hungarian magnates and lower nobility. He became very unpopular for favoring the Cumans but he was assassinated by his own Cuman favorites in 1290. Ladislaus IV without an heir to the throne and was succeeded by Andrew III (1290-1301) who the last Hungarian king from the Arpad Dynasty.
The Hungarian nobility elected Wenceslaus III Premyslid as King of Hungary after the extinction of the Arpad Dynasty. Wenceslaus renounced the Hungarian crown to Otto, Duke of Lower Bavaria in 1305 but the latter was imprisoned in 1307 and abdicated as King of Hungary one year later. The Hungarian throne was assumed by Charles Robert of the Angevin Dynasty as Charles I of Hungary (1308-1342). He managed to restore the royal power as well as to increase the Hungarian foreign prestige. In 1335, he concluded a mutual defense union with Poland which resulted in the victory over Holy Roman Emperor Louis IV and his ally the Habsburg Duke Albert II of Austria in 1337. Charles’ plans to unite the kingdoms of Hungary and Naples under his son Louis I disturbed Venice and the Pope that felt threatened from the eventual Hungarian supremacy on the Adriatic. One of his greatest achievements was the agreement with his ally and brother-in-law, Casimir III of Poland which foresaw the succession of Charles’ son to the Polish throne in case if Casimir III died childless. Thus Charles’ successor Louis I (1342-1382) assumed the Polish throne after Casimir’s death in 1370 but the Hungarian-Polish union fall apart after Louis’ death. His younger daughter gained Poland, while the elder daughter Mary became heiress to the Hungarian throne.
The Hungarian throne was assumed by Sigismund (1387-1439), Margrave of Brandenburg through marriage with Mary in 1387. Hungary was at that time seriously endangered by the Ottomans who invaded Hungary in 1395. Thus Sigismund concentrated on defending his kingdom against the Ottomans but he was severely defeated by Sultan Bayezid I in the Battle of Nicopolis in 1396. Sigismund’s authority in Hungary reached its lowest point after the defeat at Nicopolis and he put all his efforts in securing the inheritance of Germany and Bohemia.
Both Sigismund’s successors Albert II of Habsburg (1437-1439) and Wladyslaw III of Poland (1439-44) died during campaign against the Ottomans. Ladislaus the Posthumous (1440-1457) was elected King of Hungary after Wladyslaw’s death but he was under guardianship of Frederick IV who virtually held him as prisoner. Janos Hunyadi acted as his regent in Hungary until Ladislaus was freed by Ulrich of Celje, Princely Count of Celje in 1452. Ulrich of Celje acted as his guardian until 1456 when he was murdered by his rival Laszlo Hunyadi.
Ladislaus the Posthumous died in 1457 and the diet elected Matthias Corvinus (1458-1490), brother of Laszlo Hunyadi as King of Hungary. He reasserted Hungarian suzerainty over Bosnia in 1458, defeated Holy Roman Emperor Frederick III in 1462 and launched a campaign against the Ottomans who remained a constant threat. Matthias got involved in the struggle for the Bohemian throne after the death of George of Podebrady in 1471. With the Peace of Olomouc in 1478 he gained shared title of King of Bohemia and forced his rival Vladislaus II of Poland to cede Silesia, Moravia, and Upper and Lower Lusatia to Hungary. Matthias Corvinus made Hungary the dominant power in south-central Europe by the end of his reign but his successor Vladislaus II (1490-1516) was not able to pursue Matthias’ policy and lost his power to the nobles.