After Buda's fall, Transylvania, though a vassal state of the Sublime Porte (as the Ottoman government was called), entered a period of broad autonomy. As a vassal, Transylvania paid the Porte an annual tribute and provided military assistance; in return, the Ottomans pledged to protect Transylvania from external threat. Native princes governed Transylvania from 1540 to 1690. Transylvania's powerful, mostly Hungarian, ruling families, whose position ironically strengthened with Hungary's fall, normally chose the prince, subject to the Porte's confirmation; in some cases, however, the Turks appointed the prince outright. The Transylvanian Diet became a parliament, and the nobles revived the Union of Three Nations, which still excluded the Romanians from political power. Princes took pains to separate Transylvania's Romanians from those in Walachia and Moldavia and forbade Eastern Orthodox priests to enter Transylvania from Walachia.
The Protestant Reformation spread rapidly in Transylvania after Hungary's collapse, and the region became one of Europe's Protestant strongholds. Transylvania's Germans adopted Lutheranism, and many Hungarians converted to Calvinism. However, the Protestants, who printed and distributed catechisms in the Romanian language, failed to lure many Romanians from Orthodoxy. In 1571 the Transylvanian Diet approved a law guaranteeing freedom of worship and equal rights for Transylvania's four "received" religions: Roman Catholic, Lutheran, Calvinist, and Unitarian. The law was one of the first of its kind in Europe, but the religious equality it proclaimed was limited. Orthodox Romanians, for example, were free to worship, but their church was not recognized as a received religion.
Once the Ottomans conquered Buda, Walachia and Moldavia lost all but the veneer of independence and the Porte exacted heavy tribute. The Turks chose Walachian and Moldavian princes from among the sons of noble hostages or refugees at Constantinople. Few princes died a natural death, but they lived enthroned amid great luxury. Although the Porte forbade Turks to own land or build mosques in the principalities, the princes allowed Greek and Turkish merchants and usurers to exploit the principalities' riches. The Greeks, jealously protecting their privileges, smothered the developing Romanian middle class.
The Romanians' final hero before the Turks and Greeks closed their stranglehold on the principalities was Walachia's Michael the Brave (1593-1601). Michael bribed his way at the Porte to become prince. Once enthroned, however, he rounded up extortionist Turkish lenders, locked them in a building, and burned it to the ground. His forces then overran several key Turkish fortresses. Michael's ultimate goal was complete independence, but in 1598 he pledged fealty to Holy Roman Emperor Rudolf II. A year later, Michael captured Transylvania, and his victory incited Transylvania's Romanian peasants to rebel. Michael, however, more interested in endearing himself to Transylvania's nobles than in supporting defiant serfs, suppressed the rebels and swore to uphold the Union of Three Nations. Despite the prince's pledge, the nobles still distrusted him. Then in 1600 Michael conquered Moldavia. For the first time a single Romanian prince ruled over all Romanians, and the Romanian people sensed the first stirring of a national identity. Michael's success startled Rudolf. The emperor incited Transylvania's nobles to revolt against the prince, and Poland simultaneously overran Moldavia. Michael consolidated his forces in Walachia, apologized to Rudolf, and agreed to join Rudolf's general, Giörgio Basta, in a campaign to regain Transylvania from recalcitrant Hungarian nobles. After their victory, however, Basta executed Michael for alleged treachery. Michael the Brave grew more impressive in legend than in life, and his short-lived unification of the Romanian lands later inspired the Romanians to struggle for cultural and political unity.
In Transylvania Basta's army persecuted Protestants and illegally expropriated their estates until Stephen Bocskay (1605-07), a former Habsburg supporter, mustered an army that expelled the imperial forces. In 1606 Bocskay concluded treaties with the Habsburgs and the Turks that secured his position as prince of Transylvania, guaranteed religious freedom, and broadened Transylvania's independence. After Bocskay's death and the reign of the tyrant Gabriel Báthory (1607-13), the Porte compelled the Transylvanians to accept Gábor Bethlen (1613-29) as prince. Transylvania experienced a golden age under Bethlen's enlightened despotism. He promoted agriculture, trade, and industry, sank new mines, sent students abroad to Protestant universities, and prohibited landlords from denying an education to children of serfs. After Bethlen died, however, the Transylvanian Diet abolished most of his reforms. Soon György Rákóczi I (1630-40) became prince. Rákóczi, like Bethlen, sent Transylvanian forces to fight with the Protestants in the Thirty Years' War; and Transylvania gained mention as a sovereign state in the Peace of Westphalia. Transylvania's golden age ended after György Rákóczi II (1648-60) launched an ill-fated attack on Poland without the prior approval of the Porte or Transylvania's Diet. A Turkish and Tatar army routed Rákóczi's forces and seized Transylvania. For the remainder of its independence, Transylvania suffered a series of feckless and distracted leaders, and throughout the seventeenth century Transylvania's Romanian peasants lingered in poverty and ignorance.