The Thirty Years' War (1618–1648) drew in Spain alongside most other European states. Spain entered the conflict with a strong position, but the ongoing fighting gradually eroded her advantages; first Dutch, then Swedish innovations had made the tercio more vulnerable, having less flexibility and firepower than its more modern equivalents. Nevertheless, Spanish armies continued to win major battles and sieges throughout this period across large swathes of Europe. French entry into the war in 1635 put additional pressure on Spain, with the French victory at the Battle of Rocroi in 1643 being a major boost for the French, though it proved far from decisive in the long-running Franco-Spanish War (1635–1659). By the signing of the Peace of Westphalia in 1648, which brought an end to most of the fighting, Spain was clearly exhausted. Politics too had begun to count against Spain. While Spain was fighting France, Portugal — which had been under personal union with Spain for 60 years – acclaimed John IV of Braganza as king in 1640.