The baronial revolt was crushed between 1266 and 1267, leaving de Clare free to advance north into Glamorgan from his main base in Cardiff. De Clare started to construct a castle at Caerphilly to control his new gains in 1268. The castle lay in a basin of the Rhymney Valley, alongside the Rhymney River and at the heart of network of paths and roads, adjacent to a former Roman fort. Work began at a huge pace, with ditches cut to form the basic shape of the castle, temporary wooden palisades erected and extensive water defences created by damming a local stream. The walls and internal buildings were built at speed, forming the main part of the castle. The architect of the castle and the precise cost of the construction are unknown, but modern estimates suggest that it could have cost as much as castles such as Conwy or Caernarfon, perhaps as much as £19,000, a huge sum for the period.