By 1648, both sides were under increasing financial strain, forcing Philip to prioritise Catalonia, although he could not avoid declaring bankruptcy in 1647 and 1653. His position seemed desperate; in addition to an empty treasury, much of Flanders had been overrun, the key port of Dunkirk lost, and many of his best soldiers died at Rocroi. However, the situation quickly improved after the Peace of Westphalia ended the war with the Dutch, and political conflict and economic stress led to the French civil war known as the Fronde.