In 1294 Madog ap Llywelyn rebelled against English rule, the first major insurrection since the 1282 campaign. The Welsh appear to have risen up over the introduction of taxation and Madog had considerable popular support. In Glamorgan, Morgan ap Maredudd led the local uprising; Morgan had been dispossessed by de Clare in 1270 and saw this as a chance to regain his lands. Morgan attacked Caerphilly, burning half of the town, but failed to take the castle. In the spring of 1295 Edward pressed home a counter-attack in North Wales, putting down the uprising and arresting Madog. De Clare attacked Morgan's forces and retook the region between April and May, resulting in Morgan's surrender. De Clare died at the end of 1295, leaving Caerphilly Castle in a good condition, linked to the small town of Caerphilly which had emerged to the south of it and a large deer park in the nearby Aber Valley.