Political links with the German empire had declined, because of the pledging of Nijmegen in 1247. The city became more intensely involved in the domestic politics of Gelders, which was elevated to duchy status in 1339. Nijmegen worked together with the Count (later the Duke) of Gelders, the other Gelderian cities and noblemen in government, finances and warfare. With a population of approximately 10,000 Nijmegen was the biggest, most powerful and wealthiest city in Gelders. The city was aware of its economic power within the Duchy and on the grounds of the royal city rights of 1230 proclaimed itself a ‘free imperial city’. However, Nijmegen never became the official capital of the duchy. Gelders was divided into four quarters, each with its own capital: Zutphen, Arnhem, Nijmegen and Roermond.
The independent attitude of Nijmegen sometimes led to confrontations with the Gelders Dukes. In the middle of the fifteenth century, when a conflict arose between Duke Arnold of Egmond and his son Adolf, Nijmegen sided with the rebelling son and the conflict lasted for many years. In 1473 it erupted in a conquest of Gelders by Duke Charles the Bold of Burgundy, who considered himself to be the rightful successor of Duke Arnold, who had died that year. Charles the Bold took up residence in house Dukenburg and from there he ordered the city to be besieged. Nijmegen resisted strongly and held out for three weeks before finally surrendering.
Gelders regained its independence in 1492. Initially Nijmegen was loyal to the new Duke, Charles of Egmond, the son of Adolf. But in the following years hostility developed between the city and the Duke. At the end of Charles’ life in 1538 Nijmegen ensured that William van Kleef would be inaugurated as the new Duke of Gelders.In 1543 Gelders had to subject itself to Charles V. This Habsburg monarch, heir to the House of Burgundy, had already united most of the Low Countries under his control. With the Treaty of Venlo he also became the owner of the Duchy of Gelders. From that moment on Nijmegen’s wilful behaviour ended. Charles V appointed a stadtholder (city steward), who would govern the entire Duchy from Arnhem. Many affairs were arranged from Brussels, where the central governing body of the Low Countries was established. Nijmegen’s influence declined. The glorious times of the ‘free imperial city’ were over.