as the Reapers' War. The support of the people became apparent almost immediately and within a matter of hours, Philip III's third cousin John, 8th Duke of Braganza, was acclaimed as King John IV of Portugal. The news spread like wildfire throughout the country. By 2 December 1640, the day after the coup, John IV, acting in his capacity as sovereign of the country, had sent a letter to the Municipal Chamber of Évora. The ensuing conflict with Spain brought Portugal into the Thirty Years' War as at least a peripheral player. From 1641 to 1668, the period during which the two nations were at war, Spain sought to isolate Portugal militarily and diplomatically, and Portugal tried to find the resources to maintain its independence through political alliances and maintaining its colonial income. Preparations for war Immediately after assuming the Portuguese throne, John IV took several steps to strengthen his position. On 11 December 1640, a 'Council of War' was created to organize all of 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. A year later, in December 1641, he created a tenancy to assure that all of the country's fortresses would be upgraded and that the improvements would be financed with regional taxes. He also organized the army, re-established the 'Military Laws of King Sebastian', and undertook a diplomatic campaign focused on restoring good relations with England. After gaining several small victories, John tried to make peace quickly. However, his demand that Philip recognize the new ruling dynasty in Portugal was not fulfilled until the reign of his son, Afonso VI, during the regency of Peter of Braganza, another of his sons, who later became King Peter II of Portugal). Confrontations with Spain lasted 28 years. Context: relations among the European powers Relations between France and Spain In 1640, Cardinal Richelieu, the chief adviser to Louis XIII of France was fully aware of the fact that France was operating under strained circumstances. Louis was at war with Spain at that time; he had to control rebellions within France that were supported and financed by Madrid and had to send French armies to fight the Spanish Habsburgs on three different fronts. In addition to their shared frontier at the Pyrenees, Philip IV of Spain, formerly Philip III