This situation culminated in a revolution organized by the nobility and the "bourgeoisie", executed on 1 December 1640, fifty-nine years after the accession of Philip II of Spain to the throne of Portugal. A plot was planned by several associates, known as the Forty Conspirators, who killed the Secretary of State, Miguel de Vasconcelos, and imprisoned the king's cousin, Margaret of Savoy, the Vicereine of Portugal, governing the country in the King's name. Philip's troops were at the time fighting the Thirty Years' War and also dealing with a revolution in Catalonia which severely hampered Spain's ability to quash the rebellion.