Hungary fell on hard times in 1241 AD, when the Mongols invaded Eastern Europe from Central Asia. The Mongols brought with them a new invention – gunpowder from China. With gunpowder, they could win a lot of battles. Poland, Russia and Hungary all fell under the control of the Mongol Empire. Thousands of people died in the battles. Hungarian people had to spend most of the next fifty years defending themselves against Mongol raids. That was very expensive. To get more people, and also more money, the kings of Hungary encouraged Jewish people from all over Europe to move to Hungary. And they did move, even though the Golden Bull had been mean to Jewish people.
But by 1300 AD, the Mongol Empire was mostly leaving Europe alone. Hungary grew rich and powerful again. A new dynasty ruled Hungary under King Charles I. (He was a great-grandson of Louis VIII of France.) Charles built alliances with his neighbor, the Holy Roman Empire. He also married Elizabeth, whose brother Casimir was the king of Poland. Charles died in 1342, and Elizabeth ruled after him in cooperation with their teenage son Louis.
When the Black Death killed Louis’ young wife, Elizabeth found a new wife for him: another Elizabeth. The first Elizabeth promoted the interests of Hungarian women. She helped them inherit their fathers’ property. She also opened many Franciscan monasteries in Hungary. But the Franciscans didn’t like the Jews. They convinced Elizabeth to throw all Jewish Hungarians out of Hungary in 1360, though they returned four years later. When her brother Casimir died in 1370, Elizabeth added Poland to her kingdom. So she ruled most of eastern Europe, from Lithuania in the north-east to northern Italy in the south-west. In 1375, when she was 70 years old, Elizabeth retired to a monastery. She died there five years later. Her son Louis died two years after her.
Louis had no sons. So his 43-year-old widow, the second Elizabeth, split his kingdom between their two daughters (the first Elizabeth’s granddaughters), who were only ten and eleven years old. Jadwiga got Poland, and Elizabeth ruled Hungary as regent for Mary. Elizabeth was an educated woman – she wrote a book for her daughters. She surrounded herself with smart, educated assistants, pushing out powerful but uneducated men.
These men conspired against Elizabeth, but she defeated their rebellions. She kept power for five years before being captured and strangled to death by her enemies. By this time Mary was sixteen. In 1385 Mary married the son of the Holy Roman Emperor, Sigismund. He supported her right to the throne. In fact, the two of them ruled together, fighting off rebellions, until Mary died (of problems with a pregnancy) ten years later. After that, Sigismund ruled Hungary alone. He led a coalition that fought off an attack by the Ottoman sultan Bayezid the following year (mainly thanks to Timur attacking the Ottomans from the other side). After that, Sigismund got more and more power, becoming Holy Roman Emperor in 1414. His second wife, Mary’s cousin Barbara, became regent of Hungary for him.
Sigismund died in 1437, and Barbara’s daughter, a third Elizabeth, inherited power with her husband, but he died two years later, and Elizabeth ruled alone. But from 1446 on, Hungary faced a new threat: invasions by the Ottoman sultans. The Hungarians needed a great general to lead them, and instead of the king, their real ruler was John Hunadi, a great general who spent most of his time fighting off more and more serious Ottoman attacks. Hungary went back and forth between independence and being part of the big Polish-Lithuanian empire, which controlled pretty much all of eastern and central Europe.
But in 1526, under their sultan Suleiman the Magnificent, the Ottoman Empire, which had conquered the last bit of the Roman Empire in Constantinople, went on to attack Hungary. The Ottomans won a big battle there. The king of Hungary and Bohemia, Louis II, was killed in the battle, and the Ottomans took over the eastern half of Hungary. Suleiman lost his battle with the Austrians – Hungary’s neighbor to the west – three years later, so the Austrians were able to take over the western half of Hungary. That was the end of Hungary as an independent country for a long time.