Several methods resisted or countered undermining. Often the siting of a castle could make mining difficult. The walls of a castle could be constructed either on solid rock or on sandy or water-logged land, making it difficult to dig mines. A very deep ditch or moat could be constructed in front of the walls, as was done at Pembroke Castle, or even artificial lakes, as was done at Kenilworth Castle. This makes it more difficult to dig a mine, and even if a breach is made, the ditch or moat makes exploiting the breach difficult.