The Magnate conspiracy, also known as the Zriny Frangipani Conspiracy (Croatian: Zrinsko-frankopanska urota) in Croatia, and Wesselényi conspiracy (Hungarian: Wesselényi-összeesküvés) in Hungary, was a 17th-century attempt to throw off Habsburg and other foreign influences over Hungary and Croatia. The attempted coup was caused by the unpopular Peace of Vasvár, struck in 1664 between Holy Roman Emperor Leopold I and the Ottoman Empire. The poorly organized attempt at revolt gave the Habsburgs reason to clamp down on their opponents. It was named after Hungarian Count Ferenc Wesselényi, and by Croatian counts Nikola Zrinski, Petar Zrinski and Fran Krsto Frankopan.
The expansion of the Ottoman Empire into Europe began in the middle of the 14th century leading to confrontation with both Serbia and the Byzantine Empire and culminating in the defeat of both nations in, respectively, the Battle of Kosovo (1389) and the Fall of Constantinople (1453). This expansionist policy eventually brought them into conflict with the Habsburgs a number of times during the 16th and 17th centuries. After the 1526 Battle of Mohács, the middle part of the Kingdom of Hungary was conquered; by the end of the 16th century, it was split into what has become known as the Tripartite — the Habsburg-ruled Royal Hungary to the north, the Ottoman-ruled pashaluk to the south, and Transylvania to the east. A difficult balancing act played itself out as supporters of the Habsburgs battled supporters of the Ottomans in a series of civil wars and wars of independence.