The borders of Bavaria have varied considerably in its history. The region was inhabited by Celts when Drusus conquered it (15 B.C.) for Rome. The Baiuoarii (see Germans) invaded it (6th cent. A.D.) and set up the duchy to which they gave their name. It was one of the five basic or stem duchies of medieval Germany. Irish and Scottish monks began the Christianization of the area, and it was completed (8th cent.) by St. Boniface. In 788, Charlemagne defeated Duke Tassilo III and added Bavaria to his empire. From 817 to 911, Bavaria was ruled by the Carolingians Louis the German, Carloman (d. 880), Arnulf, and Louis the Child.
In 911 the duchy (then comprising, roughly, Bavaria proper, present-day Austria, and part of the Upper Palatinate) came under indigenous rulers. Frequent Magyar inroads were stopped (955) by Emperor Otto I, who in 947 had given Bavaria to his brother Henry. Henry's grandson was duke of Bavaria when he was elected (1002) German king as Henry II. After his accession Bavaria was ruled by various houses, but in 1070 Emperor Henry IV gave the fief to Welf, or Guelph, d'Este IV (see Este), who began the dynasty of the Guelphs.
From the 9th to the 12th cent. the Bavarian dukes, of whatever house, were at the center of the rebellions of the great German princes against the imperial authority. To reduce their power Emperor Otto II in 976 stripped the duchy of all but present-day Upper and Lower Bavaria and the Tyrol. When in 1137 the Guelph Henry the Proud acquired Saxony in addition to Bavaria, Conrad III deposed him and gave Bavaria to the Babenberg rulers of Austria. Frederick II restored (1156) Bavaria to Henry the Lion but in 1180 deposed the rebellious Guelph and bestowed the duchy (from which he detached considerable territory in what is now Austria) on Otto of Wittelsbach. The political history of Bavaria, much reduced in importance, became that of the Wittelsbach family, which ruled until 1918.
The Wittelsbach fiefs, including the Rhenish Palatinate (acquired in 1214), were almost always divided among the numerous branches of the dynasty. Under the Wittelsbach emperor Louis IV (reigned 1328–47), Bavaria was briefly reunited. Duke Albert IV (1467–1508), who again united Bavaria (except the Rhenish Palatinate), introduced the law of primogeniture; thus Bavaria entered the Reformation period much strengthened. The triumph of Catholicism in Bavaria proper was crucial for its later history. Duke Maximilian I (1597–1651) headed the Catholic League in the Thirty Years War and was rewarded with the Upper Palatinate and the rank of elector.
The agricultural wealth and the strategic position of Bavaria made it a coveted prize and a frequent battleground then and later. Bavaria was overrun by foreign armies, notably in the War of the Spanish Succession, the War of the Austrian Succession, the War of the Bavarian Succession (1778, by which Bavaria lost the Inn Quarter to Austria), and the French Revolutionary Wars. Elector Maximilian IV Joseph, who in 1799 united all Wittelsbach lands, allied himself with Napoleon I, joined the Confederation of the Rhine, and in 1806 was proclaimed king of Bavaria as Maximilian I. In 1813 Maximilian abandoned Napoleon and joined the allies, who at the Congress of Vienna (1814–15) left him in possession of virtually all of present-day Bavaria, including the Rhenish Palatinate.
During the period of reaction that followed in Europe, Bavaria stood out for its relatively liberal government. The liberal constitution of 1818 lasted exactly a century. King Louis I (1825–48), dethroned by the mild revolution of 1848, was succeeded by the able Maximilian II (1848–64) and the brilliant but insane Louis II (1864–86). All three rulers had a passion for the arts, science, and architecture. The reputation of Bavaria, particularly Munich, as a cultural center dates from their reigns. The abolition in 1848 of guild restrictions opened the way for industrialization.
At the same time, the rural prosperity of Bavaria and the strong influence of the Catholic Church (which predominates except in the Upper Palatinate and in Middle Franconia) accented the hostility of Bavaria toward the rising power of Prussia. Bavaria sided with Austria in the Austro-Prussian War (1866). Defeated in that war, it acknowledged Prussian leadership, sided with Prussia against France in 1870–71, and joined (1871) the German Empire. As the chief German state after Prussia, Bavaria retained separatist tendencies.
King Louis III, successor to the mad Otto I, was dethroned in Nov., 1918, by Kurt Eisner, who established a socialist republic. The assassination (Feb., 1919) of Eisner led to a Communist revolution (Apr., 1919), which was bloodily suppressed by the German army. Bavaria then joined the Weimar Republic. In the early 1920s, Munich became the center of the National Socialist (Nazi) movement; in 1923 the National Socialists made an abortive attempt (Beer Hall Putsch) in that city to seize power. Catholic Bavaria as a whole gave little support to the movement until Adolf Hitler came to national power in 1933. Under the National Socialist regime Bavaria lost its autonomy.
After World War II, Bavaria became part of the American occupation zone. The Rhenish Palatinate was separated from Bavaria and was later made part of the state of Rhineland-Palatinate. A new constitution for Bavaria was drawn up in 1946. Since the founding of the Federal Republic of Germany in 1949, the conservative Christian Social Union, allied nationally with the Christian Democratic Union, has been the strongest Bavarian political party.