Some of the Netherlander provinces were hostile to Maximilian, and, in 1482, they signed a treaty with Louis XI in Arras that forced Maximilian to give up Franche-Comté and Artois to the French crown. They openly rebelled twice in the period 1482–1492, attempting to regain the autonomy they had enjoyed under Mary. Flemish rebels managed to capture Philip and even Maximilian himself, but they were defeated when Frederick III intervened. Maximilian continued to govern Mary's remaining inheritance in the name of Philip the Handsome. After the regency ended, Maximilian and Charles VIII of France exchanged these two territories for Burgundy and Picardy in the Treaty of Senlis (1493). Thus a large part of the Netherlands (known as the Seventeen Provinces) stayed in the Habsburg patrimony.