Diploma Leopoldinum

The Diploma Leopoldinum was a legal document which determined the basic principles of the government of the Principality of Transylvania within the Habsburg Empire. The diploma was drafted by Miklós Bethlen, Chancellor of Transylvania. The Holy Roman Emperor, Leopold I, sanctioned it in Vienna on 16 October 1690. The diploma announced on 4 December 1691. The diploma restored civil administration in the principality, and confirmed the traditional liberties of the Three Nations of Transylvania, including the freedom of the four "received" religions.
Background.
Until 1683, it stood at the peak of the Ottoman Empire's power in Hungary. Mihály I Apafi was promoted to princely position against János Kemény. In 1681, in exchange for abundant gifts, the Porta recognized the election of Michael Apafi as prince. However, in 1682, Sertar Pasha Ibrahim proclaimed Imre Thököly the prince of Hungary. In 1683, the Turks besieged Vienna, where the Transylvanian armies lined up alongside the Turks, yet it was feared that after the conquest of Vienna, the Turks would make Thököly the prince of Transylvania instead of Apafi. However, after the unsuccessful siege of Vienna, the Turkish fortunes of war reversed quickly and permanently, the imperial troops went into a counterattack and by 1684 they had already besieged Buda. In this situation Apafi began a diplomatic groping towards Vienna, from where in 1685 a Jesuit ambassador was sent to his court.
The ambassador signed a secret contract with Mihály Teleki, according to which Teleki will settle the agreement between Transylvania and Vienna. At the urging of Teleki and as a result of the preparations for the siege of Buda in 1686, an agreement was finally reached, Haller's diploma (June 28, 1686), according to which the German emperor and Hungarian king also exercised supreme power over Transylvania, Transylvania renounced its independent foreign policy, in exchange for which 1/6 of the German army is stationed in Transylvania to protect Transylvania, and privileges and freedom of religion remain undisturbed. 
Transylvania pays the military “military service” instead of Turkish taxes. In exchange for formal dependence, Lipót confirmed Apafi Jr.'s right to inherit. However, its statehood remained and it regained some of the territories that Transylvania had lost in the peace of Vasvár. Apparently, Apafi signed this treaty for two reasons: on the one hand, the closure of Buda had already been completed, Turkish assistance could not be counted from then on, and on the other hand, the Turks still supported Thököly against him.
In 1687, the Imperial army, which had stopped the Turkish counterattack (August 12, 1687), marched to Transylvania in September, according to Haller's diploma, which practically meant the occupation of Transylvania. After the occupation of Somlyó, Kolozsvar and Szamosújvár, they stopped negotiating at Szeben.
He was inducted into the princely dignity on September 17, II. Mihály Apafi. Charles of Lorraine cared more for the food of his soldiers than for the interests of the Habsburgs, so he concluded with the elder Apafi the pact of Balázsfalva (October 27, 1687), in which the principality swore to the emperor and received German garrisons.
In return for leaving Apafi independent, he committed himself to supplying the army. At the same time (October 31, 1687), the Diet of Pozsony declared the Habsburgs' inherited right to the crown of St. Stephen, which Lipót interpreted together with Transylvania.
The Balázsfalva pact was, of course, not accepted by Vienna, and in 1688 Caraffa was sent to Transylvania with the appointment of commander-in-chief. By May, Transylvania had returned to Hungary in the Fogaras Declaration and the Turkish patronage would be terminated, placing Transylvania under the protection of Lipót(Leopold I). Transylvania pays a tax to Lipót and the imperial army can enlist. In return, Lipót promised only the maintenance of religious freedom. 
Transylvania became a de facto province not a quasi separate state with freedom rights but where the arbitrary of the king or the army what was matter. 
Mihály Apafi died in 1690, II. However, Suleiman did not confirm Apafi Jr.'s ferman of 1681, but sent an athname to Thököly. In response, the Transylvanian orders asked Lipót to confirm Apafi. The content of the ratification document was considered for a long time in Vienna, and according to CaraffaAntonio Caraffa's draft, Transylvania would have become a simple Habsburg province in exchange for ratification.
The milder tone of the Diploma Leopoldinum is due to the fact that in 1689 Lieutenant General Donat HeisslerDonat John, Count Heissler of Heitersheim was defeated by Thököly in the battle of ZernyestiBattle of Zernest , who was elected prince by the Transylvanians. The imperial army sent to relieve Nándorfehérvár had to be turned back against Thököly in Transylvania, so in early October 1690 Nándorfehérvár was recaptured by the Turks with a short siege. In this crisis, Lipót signed the charter, which left Transylvania's internal independence. Until his adulthood, Apafi set up a gubernium (governorate) in which the Transylvanian orders elect the governor, Lipót only confirms the election.
Modifications.
Catholics were not satisfied with points 1) and 2) of the letter of credit. Governor György Bánffy and Chancellor Miklós Bethlen were unable to meet the clauses on free religious practice, although they provided for a new distribution of the tithe and the handover of certain churches and schools. The diocese was also re-established despite the fact that the former episcopal property had long been secularized. However, some churches and schools, as well as other property issues, remained unresolved. According to the Diploma Leopoldinum, if the gubernium is unable to perform the tasks assigned to it, the Viennese court will decide for them. Therefore, a supplementary diploma was issued on 9 April 1693, according to which (also quoted
On May 14, 1693, another document was issued, which, because it was a response to the submissions of Péter Alvinczi, the instructed ambassador of the Transylvanian orders, was commonly referred to as the Alvincziana resolution.
About religious and nationality reasons.
The Leopold Diploma of 1691, promulgated by Emperor Leopold I on December 4, 1691, was the act by which the Principality of Transylvania was directly subordinated to the Court of Vienna following military and political successes against the Ottoman Empire, which from 1541(or 1529 by Zapolya) until once held political suzerainty over the principality.
At the base of the Leopoldine Diploma of 1691 is the Treaty of Vienna of 1686 (Hallerian Treaty), by which Transylvania was placed under the protection of Vienna, which recognized Michael Apafi II as prince. At the same time, the Ottoman High Gate appointed Emeric Thököly as prince of Transylvania.
Through the Leopoldine Diploma of 1691, Transylvania obtained a separate political status from that of the Kingdom of Hungary, of which it was a part before the Ottoman occupation. The legislation of the Kingdom of Hungary (Approved, Compiled, and Werböczi's Code) remained in force, and the privileges of the nobility, the Saxons, and the Szeklers were recognized by the emperor. In religious matters, the provisions of the Edict of Torda of 1568, which proclaimed freedom of conscience and religious tolerance, with four prescribed confessions, as opposed to the decisions of the Diet of Pozsony of 1608 and 1647 (valid in Hungary), where they were recognized only three confessions (the Roman, the Augustan and the Swiss denominations). In Transylvania there is the fourth received confession, namely that of the Unitarian Church in Transylvania. The practice of Greek religion, Zwinglianism, Anabaptism and Mosaic religion was tolerated in both Hungary and Transylvania. The anti-Trinitarian cult, received in Transylvania, had in Hungary the status of tolerated cult, like the four cults tolerated in Transylvania.
At the same time, the Vienna Court used the religious union of the Transylvanian Romanians as an instrument for the dislocation of medieval autarchies, in its political effort to break historical monopolies. In this context, by the first Leopoldine diploma related to confessional matters of February 16, 1699, Emperor Leopold I recognized to the united clergy the same privileges as those of the Latin clergy, and the second of March 19, 1701, recognized all lay people - including peasants - who accept union with Rome, that they will no longer be treated as mere "tolerated", but will enjoy all "civil" rights. This imperial attempt to undermine the privileges of the nobles, the Saxons and the Szeklers could not be implemented because the Romanians were not at that time in a position to offer a consistent social elite. The hostility of the nobility (mostly Calvinist) towards the United Romanian Church came as a result of the perception of union with Rome as an instrument of Vienna's policy of overthrowing the political system in Transylvania, a possibility legally anchored even by the Diploma of 1691.