Following religious riots in Perth, the Lords gained support and provided military help to John Knox in opposing the troops of Mary of Guise. Near Cupar, in Fife, the Lords fielded enough military strength to face off a French and Scottish army jointly led by the Duke of Châtelherault (who as Regent had supported the French match) and by D'Oysel the French king's lieutenant. By July 1559 the Lords of the Congregation had taken Edinburgh. As Edinburgh Castle held out against them, the Lords withdrew under the terms of the truce of the Articles of Leith (25 July 1559). In September, Châtelherault, now joined by his son the Earl of Arran, changed sides and became leader of the Congregation Lords.