1 December 1640, 60 years after the crowning of Philip I. This revolution, while foreseeable, was most immediately sparked by a popular Catalan Revolt against the Crown. The plot was planned by Antão Vaz de Almada, Miguel de Almeida and João Pinto Ribeiro. They, together with several associates, known as the Forty Conspirators, took advantage of the fact that the Castilian troops were occupied in the other side of the Iberian Peninsula. The rebels killed Secretary of State Miguel de Vasconcelos and imprisoned the king's cousin, the Duchess of Mantua, who had governed Portugal in his name. The moment was well chosen, as Philip's troops were at the time fighting the Thirty Years' War in addition to the previously mentioned revolution in Catalonia. The support of the people became apparent almost immediately and soon John, 8th Duke of Braganza, was acclaimed King of Portugal throughout the country as John IV. By 2 December 1640, John had already sent a letter to the Municipal Chamber of Évora as sovereign of the country. Restoration War and the end of the Union The subsequent Portuguese Restoration War against Philip III () consisted mainly of small skirmishes near the border. The most significant battles were the Battle of the Lines of Elvas (1659), the Battle of Ameixial (1663), the Battle of Castelo Rodrigo (1664), and the Battle of Montes Claros (1665); the Portuguese were victorious in all of these battles. However, the Spaniards won the Battle of Vilanova (1658) and the Battle of the Berlengas (1666). The Battle of Montijo (1644) was indecisive, starting out with great Spanish success and ending with Portuguese success; the number of casualties were nearly equal. Several decisions made by John IV to strengthen his forces made these victories possible. On 11 December 1640, the Council of War was created to organize all the operations. Next, the king created the Junta of the Frontiers, to take care of the fortresses near the border, the hypothetical defense of Lisbon, and the garrisons and sea ports. In December 1641, a tenancy was created to assure upgrades on all fortresses that would be paid with regional taxes. John IV also organized the army, established the Military Laws of King Sebastian, and developed intense diplomatic activity focused on restoring good relations with England. Meanwhile, the best Spanish forces were pre-occupied with their battles against the French in Catalonia, along the Pyrenees, Italy and