The area now constituting Transylvania became part of the Roman Empire in A.D. 107. After the withdrawal (A.D. 271) of the Romans from the region it was overrun, between the 3d and 10th cent., by the Visigoths, the Huns, the Gepidae, the Avars, and the Slavs. The Magyar tribes first entered the region in the 5th cent., but they did not fully control it until 1003, when King Stephen I placed it under the Hungarian crown. The valleys in the east and southeast were settled by the Székely, a people akin to the Magyars. It is not known, however, whether they came into Transylvania with or before the Magyars.
In the 12th and 13th cent. the areas in the south and northeast were settled by German colonists called (then and now) Saxons. Siebenbürgen, the German name for Transylvania, derives from the seven principal fortified towns founded there by the Saxons. The German influence became more marked when, early in the 13th cent., King Andrew II of Hungary called on the Teutonic Knights to protect Transylvania from the Cumans, who were followed (1241) by the Mongol invaders. Large numbers of Romanians, called Vlachs or Walachians, were in the region by 1222, although the exact date that their penetration began is disputed. Originally seminomadic shepherds, the Vlachs soon settled down to agriculture.
The administration of Transylvania was in the hands of a royal governor, or voivode, who by the mid-13th cent. controlled the whole region. Society was divided into three privileged "nations," the Magyars, the Székely, and the Saxons. These "nations," however, corresponded to social rather than strictly ethnic divisions. Although the nonprivileged class of serfs consisted mostly of Vlachs, it also included some people of Saxon, Székely, and Magyar origin. A few Vlachs, notably John Hunyadi, hero of the Turkish wars, joined the ranks of the nobility. After the suppression (1437) of a peasant revolt the three "nations" solemnly renewed their union; the rebels were cruelly repressed, and serfdom became more firmly entrenched than ever.
When the main Hungarian army and King Louis II were slain (1526) in the battle of Mohács, John Zapolya, voivode of Transylvania, took advantage of his military strength and put himself at the head of the nationalist Hungarian party, which opposed the succession of Ferdinand of Austria (later Emperor Ferdinand I) to the Hungarian throne. As John I he was elected king of Hungary, while another party recognized Ferdinand. In the ensuing struggle Zapolya received the support of Sultan Sulayman I, who after Zapolya's death (1540) overran central Hungary on the pretext of protecting Zapolya's son, John II. Hungary was now divided into three sections: W Hungary, under Austrian rule; central Hungary, under Turkish rule; and semi-independent Transylvania, where Austrian and Turkish influences vied for supremacy for nearly two centuries.
The Hungarian magnates of Transylvania resorted to a policy of duplicity in order to preserve independence. The Báthory family, which came to power on the death (1571) of John II, ruled Transylvania as princes under Ottoman, and briefly under Hapsburg, suzerainty until 1602, but their rule was interrupted by the incursion of Michael the Brave of Walachia and by Austrian military intervention. In 1604, Stephen Bocskay led a rebellion against Austrian rule, and in 1606 he was recognized by the emperor as prince of Transylvania. Under Bocskay's successors—especially Gabriel Bethlen and George I Rákóczy—Transylvania had its golden age. The principality was the chief center of Hungarian culture and humanism, the main bulwark of Protestantism in E Europe, and the only European country where Roman Catholics, Calvinists, Lutherans, and Unitarians lived in mutual tolerance. Orthodox Romanians, however, were denied equal rights.
After the Turkish defeat near Vienna (1683), Transylvania vainly battled the growing Austrian influence, and its alliance with Turkey under Emeric Thököly and with France under Francis II Rákóczy proved fatal to its independence. In 1711, Austrian control was definitely established over all Hungary and Transylvania, and the princes of Transylvania were replaced by Austrian governors. The proclamation (1765) of Transylvania as a grand principality was a mere formality. The pressure of Austrian bureaucratic rule gradually eroded the traditional independence of Transylvania. In 1791 the Romanians petitioned Leopold II of Austria for recognition as the fourth "nation" of Transylvania and for religious equality. The Transylvanian diet rejected their demands, restoring the Romanians to their old status.
In 1848 the Magyars proclaimed the union of Transylvania with Hungary, promising the Romanians abolition of serfdom in return for their support against Austria. The Romanians rejected the offer and instead rose against the Magyar national state. In the fighting that followed (1849) between the Hungarians and the Austro-Russian forces (supported by the Romanians and most of the Saxons), the Hungarian republic of Louis Kossuth was suppressed. The ensuing period of Austrian military government (1849–60) was disastrous for the Magyars but greatly benefited the Romanian peasants, who were given land and otherwise favored by the Austrian authorities. However, in the compromise ( Ausgleich ) of 1867, which established the Austro-Hungarian Monarchy, Transylvania became an integral part of Hungary, and the Romanians, having tasted equality, were once more subjected to Magyar domination.
After World War I the Romanians of Transylvania proclaimed at a convention at Alba Iulia (1918) their union with Romania. Transylvania was then seized by Romania and was formally ceded by Hungary in the Treaty of Trianon (1920). The expropriation of the estates of Magyar magnates, the distribution of the lands to the Romanian peasants, and the policy of cultural Romanianization that followed were major causes of friction between Hungary and Romania. It was now the turn of the Magyar and German nationalists to complain of Romanian oppression. During World War II, Hungary annexed (1940) N Transylvania, which was, however, returned to Romania after the war. Many of the Saxons of Transylvania fled to Germany before the arrival of the Soviet army, and most of the remaining Saxons followed after the fall of the Communist government in 1989.