The Hungarians refer to themselves as Magyars and speak a Uralic language unrelated to the Indo-European tongues surrounding them. This linguistic isolation traces to migrations from beyond the Ural Mountains. The Magyar tribes arrived in the Carpathian Basin in 896 under the leadership of Árpád, crossing the Verecke Pass and displacing or absorbing the existing Slavic and Avar populations. Archaeological evidence and the Gesta Hungarorum, though written centuries later by an anonymous notary, document this conquest. The seven Magyar tribes allied with three Kabar tribes established themselves across the Great Hungarian Plain, the Transdanubian territories, and the river valleys of the Danube and Tisza. By 900, raiding parties pushed westward into Bavaria, northern Italy, and as far as Burgundy, creating what contemporary chronicles called the Hungarian menace across Europe.
Prince Géza initiated contact with Christian Europe in the 970s. His son Stephen received a crown from Pope Sylvester II on Christmas Day 1000, becoming Hungary's first king. Stephen I established a diocesan system with archbishoprics at Esztergom and Kalocsa, destroyed pagan shrines, and enforced baptism through royal decree. He died in 1038 and was canonized in 1083. His embalmed right hand, the Holy Right Hand, remains in St. Stephen's Basilica in Budapest, displayed in a reliquary. Stephen's legal code, the Decretum, organized the kingdom into counties administered by royal appointees called ispáns, a structure persisting in modified form until 1950. The Árpád dynasty ruled until 1301 through male descendants, weathering Mongol invasion in 1241, when Batu Khan's forces killed an estimated quarter to half of the population before withdrawing in 1242.
King Béla IV rebuilt Hungary after the Mongol devastation, constructing stone fortifications including the expanded Buda Castle and granting town charters to attract German settlers. The intermarriage of Hungarian nobility with Polish, Czech, and Austrian dynasties created the multiethnic character of medieval Hungarian aristocracy. When the Árpád line ended with Andrew III, foreign kings ruled in succession. The Angevin Charles I Robert of Naples secured the throne in 1308 after years of dispute. His son Louis the Great reigned from 1342 to 1382, also holding the Polish crown from 1370, and expanded Hungarian territory to its greatest medieval extent from the Adriatic to the Black Sea. The Jagiellonian and Habsburg dynasties followed through marriage alliances and contested successions.
Matthias Corvinus ruled from 1458 to 1490, creating Central Europe's most sophisticated Renaissance court. He established the Bibliotheca Corviniana, a library exceeding 3,000 manuscripts and codices, second only to the Vatican's collection. Flemish and Italian artists worked in Buda and Visegrád. Matthias conquered Moravia, Silesia, and Lusatia, and occupied Vienna from 1485 until his death. He never secured the Holy Roman Emperor title despite his military strength because Frederick III refused recognition. Matthias maintained a standing mercenary army, the Black Army, numbering approximately 28,000 men according to contemporary estimates. He financed this through extraordinary taxation that weakened the lesser nobility's support. After his death, Hungary fragmented under weak kings unable to resist Ottoman expansion from the Balkans.
Sultan Suleiman the Magnificent invaded in 1526. At Mohács on August 29, King Louis II led approximately 25,000 Hungarian troops against an Ottoman force estimated between 50,000 and 100,000. The battle lasted less than two hours. Louis drowned fleeing across a stream, weighed down by his armor. The Ottoman cavalry and janissaries destroyed the Hungarian army, killing an estimated 14,000 men including five bishops and most of the nobility. Suleiman occupied Buda briefly, then withdrew. Hungary split three ways: Royal Hungary under Habsburg control in the west and north, the Ottoman-controlled central territories, and the semi-independent Principality of Transylvania in the east paying tribute to Constantinople. This partition lasted 150 years.
The siege of Eger in 1552 became Hungary's foundational resistance narrative. Captain István Dobó commanded approximately 2,000 defenders, including women who carried stones and poured boiling water and pitch on attackers, against an Ottoman force estimated at 35,000 to 40,000 under Kara Ahmed Pasha. After five weeks, the Ottomans withdrew on October 18, having failed to breach the castle walls. Eger fell in 1596 to a later siege, but the 1552 defense entered Hungarian consciousness through Géza Gárdonyi's 1899 novel "Egri Csillagok" (Stars of Eger), which every Hungarian student encounters in school. The castle remains a national monument, its walls preserved and the casemates open for tours.
Ottoman rule transformed the occupied territories. The Great Hungarian Plain became pastureland for Ottoman cavalry horses. Entire villages emptied as populations fled north and west or died in recurring campaigns. Pécs, Eger, and other cities acquired mosques, bathhouses, and bazaars. The 1686 siege of Buda by Habsburg forces left the city in ruins, its population reduced from an estimated 25,000 to under 1,000. Ottoman administrative records show systematic taxation and land reorganization under timar military grants. The Ottomans departed gradually between 1686 and 1699 following the Treaty of Karlowitz, which transferred control of most of Hungary to Habsburg Austria. Transylvania maintained autonomy until 1711.
The Habsburg monarchy repopulated devastated areas with German, Slovak, Romanian, and Serbian settlers. By 1720, ethnic Hungarians constituted a minority in their own kingdom. Vienna treated Hungary as conquered territory rather than a partner realm. Maria Theresa and Joseph II attempted centralizing reforms that threatened Hungarian autonomy. The Diet in Pressburg (Bratislava) and later Pest defended Hungarian legal privileges established in the Golden Bull of 1222, which restricted royal power and guaranteed noble rights. Latin remained the official administrative language until 1844 despite Habsburg pressure for German. This linguistic conservatism preserved pre-Ottoman legal continuity.
Count István Széchenyi initiated Hungary's reform era in the 1820s and 1830s. He founded the Hungarian Academy of Sciences in 1825, invested in the first permanent bridge across the Danube at Budapest (the Chain Bridge, completed in 1849), and promoted agricultural modernization on his estates. His 1830 book "Hitel" (Credit) analyzed Hungary's economic backwardness and proposed English-style capitalist development. Lajos Kossuth, a lawyer and journalist, radicalized nationalist politics through his newspaper Pesti Hírlap, advocating constitutional government and Hungarian language rights. These two men represented the conservative and revolutionary wings of Hungarian nationalism that converged in 1848.
The March 15, 1848 revolution began in Pest with demands for press freedom, responsible government, and civil equality. Sándor Petőfi recited his "National Song" on the steps of the National Museum. A delegation traveled to Vienna where Ferdinand I accepted the April Laws establishing a constitutional monarchy under Hungarian parliamentary control. Lajos Batthyány became prime minister. The revolution radicalized when Croatian forces under Josip Jelačić invaded at Vienna's direction in September. Kossuth raised a Hungarian army while Batthyány resigned. In April 1849, the Hungarian parliament meeting in Debrecen declared independence and deposed the Habsburgs, with Kossuth as governor-president. Franz Joseph I requested Russian intervention. Tsar Nicholas I sent 200,000 troops who joined Austrian forces. The Hungarian army surrendered at Világos on August 13, 1849. The Austrians executed 13 generals at Arad on October 6 and imprisoned thousands more. Batthyány was shot in Budapest on the same day. Kossuth fled to Turkey and spent decades in exile.