In 1664, the Austrian imperial army was victorious against the Turks, but Emperor Leopold failed to capitalize on the success when he signed the Peace of Vasvár in which Croatia and Hungary were prevented from regaining territory lost to the Ottoman Empire. This caused unrest among the Croatian and Hungarian nobility which plotted against the emperor. Nikola Zrinski participated in launching the conspiracy which later came to be known as the Magnate conspiracy, but he soon died, and the rebellion was continued by his brother, Croatian ban Petar Zrinski, Fran Krsto Frankopan and Ferenc Wesselényi. Petar Zrinski, along the conspirators, went on a wide secret diplomatic negotiations with a number of nations, including Louis XIV of France, the Polish–Lithuanian Commonwealth, Sweden, the Republic of Venice and even the Ottoman Empire, to free Croatia from the Habsburg sovereignty.