 In early fortifications, ditches were often used in combination with ramparts to slow down the enemy whilst defensive fire could be brought to bear from the relative protection afforded by the rampart and possibly the palisade.In medieval fortification, a ditch was often constructed in front of a defensive wall to hinder mining and escalade activities from an attacker.When filled with water, such a defensive ditch is called a moat.