The Zrinski and Frankapan conspiracy is a movement of the Croatian and Hungarian nobility against the absolutist policy of the Habsburgs, which began in 1664 and ended in 1671 with the execution of the main actors of the conspiracy. It arose as a result of specific circumstances in the Hungarian-Croatian Kingdom, which was attacked by the Ottoman invaders, and circumstances in the Habsburg Monarchy, which followed the Thirty Years’ War (1618–48) and the signing of the Peace of Westphalia (1648).
After the end of the Thirty Years’ War, the Habsburgs focused their attention on strengthening the dynastic power in their inherited lands and in the Hungarian-Croatian Kingdom, and in this they were hindered by all the influential and powerful nobles, especially those who, like the Zrinskis, had strong economic potential and had their own army . The strengthening of absolutism of the Viennese court caused dissatisfaction and the first anti-Habsburg plans among the Croatian and Hungarian nobility as early as the middle of the 17th century. It seems that around 1663 there were plans to overthrow the Habsburgs from the Croatian-Hungarian throne and to elect Nikola VII Zrinski as king, which he refused.

The signing of the Peace of Vasvar in 1664 showed that King Leopold I of Habsburg, together with his court, did not want to pursue a policy aimed at liberating the Croatian and Hungarian lands from Ottoman rule. Even though the Ottomans lost the war that lasted from 1660 to 1664, all these areas were returned to them by this treaty. This led to an increase in the dissatisfaction of the Croatian and Hungarian nobility and to the strengthening of the activities of the anti-Habsburg nobility group led by Nikola VII. Zrinski, who, in addition to the Hungarian nobles, won over his brother Petar IV for his plans.
But besides that, there were other reasons that influenced the conflict between the powerful Croatian families and the Habsburgs. Namely, the possessions of the Zrinskis were an obstacle to the development of the trade of the Austrian lands because many merchants violated the regulations of the Vienna Court Chamber and exported goods through the ports owned by the Zrinskis; bypassing the Habsburg ports of Rijeka and Trieste, they reduced the income of the Habsburgs. The Zrinskis were dangerous for the Habsburgs because, in the event of an uprising, they could win over soldiers from the Croatian Military Frontier to their side.

For the preparation of the conspiracy, the conspirators were joined by the Protestant towns in the north of Hungary, Erdely and part of the lower nobility. Despite this, the conspiratorial forces were aware that they did not have the strength to wage war against the Habsburgs and turned to the French king Louis XIV for help. In addition, Petar IV. Zrinski sent his wife Ana Katarina to Venice for negotiations with the French envoy, Bishop Peter de Bonsy. In 1664, after the mysterious death of Nikola VII. Zrinski on the hunt, in Hungary the leadership was taken over by the local nobles, and in Croatia, Petar IV. Zrinski, who won over his brother-in-law Fran Krsto Frankapan for anti-Habsburg plans. Petar continued negotiations with the French envoy Gremonville in Vienna, demanding financial and military aid for the fight against the Ottomans, and Louis XIV. he offered the crown of St. Stephen. Although Louis refused to give help and accept the throne, French diplomacy secretly encouraged anti-Habsburg dissidents because it put pressure on the Habsburgs in moments of conflict over the Spanish heritage. When Louis XIV. signed a secret agreement with Leopold on the division of the Spanish inheritance in 1668, the French court broke off relations with the conspirators. During 1666, Petar IV. Zrinski made a secret alliance with the Hungarian palatine Wesselényi, and court judge Nádasdy joined them also. In 1667, the Styrian nobleman Erasmo Tattenbach joined the conspiracy, and in 1669, the son-in-law of Petar IV. Zrinski, the respected Erdely nobleman F. I. Rákóczy.

While there was a tendency among the Protestants in Upper Hungary for an alliance with the Ottomans, the Porte (Ottoman court) was preoccupied with the war against the Venetian Republic for the island of Crete and was unable to provide effective assistance to the insurgents. Having unsuccessfully tried to win over the new Polish king and the Venetian Republic to his side, Petar IV. Zrinski in 1670 sent a delegation to the Porte which, in exchange for military assistance in the uprising against the Habsburgs, was supposed to propose the recognition of Ottoman supreme authority over the Hungarian-Croatian Kingdom. Despite the failure of the delegation, Petar IV. Zrinski In March 1670 began to prepare an uprising, which was to be led by Fran Krsto Frankapan. He hoped that with the help of the Bishop of Marcha, Gavra Mijakić, he would get soldiers from the Military Frontier on his side, and that F. I. Rákóczy would join the anti-Habsburg military uprising.

But the Viennese court was informed about all the contacts of the conspirators with foreign powers and could prepare countermeasures before the start of an open uprising, and some conspirators also delivered information to the court. When they saw that the anti-Habsburg plan had no chance of success, Petar IV. Zrinski and Fran Krsto Frankapan decided to ask the king for forgiveness. The king promised them safety in writing in the event of their arrival in Vienna and was inclined to reconciliation, but his ministers believed that Zrinski and Frankapan should be severely punished. During Zrinski’s and Frankapan’s trip to Vienna, the Habsburg generals seized and looted their possessions and at the same time removed isolated hot spots of conspiracy. Upon arrival in Vienna, Petar IV. Zrinski and Fran Krsto Frankapan were arrested and transferred to the prison, where they were executed after an illegal trial on 30 June 1671. Also all their property was confiscated. On the same day, court judge F. Nádasdy and Franjo Bonis were executed in Vienna and Pressburg as the representatives of Hungarian Protestants. Later, E. Tattenbach was also executed.

With the collapse of the conspiracy, the power of the two most influential Croatian noble families, Zrinski and Frankapan, was broken and the ability of the Croatian nobility to fight for the municipal rights of the country was weakened. These two families soon completely disappear from the political scene. In addition, with the confiscation of their estates, a large part of Central Croatia and Primorje came under the control of the Palace Chamber, which had far-reaching consequences for the overall development of Croatian lands.