The Árpád dynasty became extinct in 1301 and soon after that Charles (Károly) I and the Angevin dynasty came to power. Though born in France, Charles was a distant descendant of István V. The Angevin line ruled until 1386 when Queen Mária married the Holy Roman Emperor Sigismund (Zsigmond). The next century and a half saw internal disputes and rival claims to the throne, as well as invasion by the Ottoman Empire. A notable king of this period was Mátyás Corvinus, who expanded the kingdom and rallied against the Ottomans.
Starting in 1563 the Habsburg family ruled Hungary (they were also Holy Roman Emperors until 1806). The monarchy was dissolved after World War I.