After the last Valois Duke of Burgundy, Charles the Bold, had died without male heir at the 1477 Battle of Nancy, his cousin Louis XI of France was determined to come into his inheritance, especially the Burgundian Netherlands with the thriving County of Flanders. However, Mary the Rich, daughter of Charles the Bold, and her husband Maximilian also claimed their rights, which led to clashes of arms culminating at the 1479 Battle of Guinegate, concluded in favour of Mary and Maximilian. Nevertheless, Mary died in 1482 and according to the Treaty of Arras, Maximilian had to cede Burgundy, the County of Artois including the City of Arras and several minor lordships to France as dowry for the proposed marriage of their daughter, Margaret, with Louis' son Charles.
When Charles VIII, now King of France, married Anne of Brittany - who was at that time married in proxy to Maximilian - instead of Margaret, Maximilian urged the return of his daughter and the retrieval of the County of Burgundy, Artois and Charolais. In 1493, Charles VIII, stuck in the conflict with King Alfonso II of Naples, finally had to acknowledge the claims. Based on the terms of the Senlis Treaty, all hostilities between France and the Seventeen Provinces were officially over. Moreover, the disputed territories were relinquished to the House of Habsburg and Artois and Flanders were annexed by the Holy Roman Empire. However, France was still able to retain powerful legal claims and outposts in both provinces. The Duchy of Burgundy (with capital Dijon and not to be confused with the Free County of Burgundy with capital Dole), which had also been ceded to France in 1482, remained in French hands.