as their protectors in the same way they had previously treated the dukes of Burgundy. In 1526, the city obtained the right to mint coins, which it continued to strike until 1673. Nevertheless, all coins bore the name of Charles V. When Charles V abdicated in 1555, he gave Franche-Comté to his son, Philip II, King of Spain. Besançon remained a free imperial city under the protection of the king of Spain. In 1575, following the death of Charles IX of France, Huguenots attempted to capture Besançon in order to make it a stronghold, which meant that the city had to accept a Spanish garrison for protection - an important decline in its independent status. In 1598, Philip II gave the province to his daughter on her marriage to an Austrian archduke. It remained formally a portion of the Empire until its cession from Austria to Spain, along with Franche-Comté, in the peace of Westphalia in 1648. The city lost its status as a free city in 1651 as a reparation for other losses that the Spanish had suffered in the Thirty Years' War. After some resistance this was finally confirmed by Besançon in 1654, although Besançon kept a high degree of internal autonomy. Disputes with France In 1667, Louis XIV claimed Franche-Comté as a consequence of his marriage to Maria Theresa of Spain. As part of the War of Devolution French troops arrived in the area in 1668. Besançon tried to argue that it was neutral in any hostilities as it was a Free Imperial City of the Holy Roman Empire, something that the French commander the Prince de Conde rejected as archaic. The French agreed to very generous surrender terms with the town authorities which included transferring the university from the then still recalcitrant Dole. There were also rumours that the regional Parlement may be transferred from Dole. The City also laid down that they would be left the relic of a fragment of the holy winding sheet and that Protestants should not have liberty of conscience in the same way as they then had in the rest of France. While it was in French hands, the famed military engineer Vauban visited the city and drew up plans for its fortification. The Treaty of Aix-la-Chapelle returned it to Spain within a matter of months in return for the town of Frankenthal. The Spaniards built the main centre point