A scarp and a counterscarp are the inner and outer sides, respectively, of a ditch or moat used in fortifications. Attackers (if they have not bridged the ditch) must descend the counterscarp and ascend the scarp. In permanent fortifications the scarp and counterscarp may be encased in stone. In less permanent fortifications, the counterscarp may be lined with paling fence set at an angle so as to give no cover to the attackers but to make advancing and retreating more difficult.

If an attacker succeeds in breaching a wall a coupure can be dug on the inside of the wall to hinder the forlorn hope, in which case the side of the ditch farthest from the breached wall and closest to the centre of the fortification is also called the counterscarp.[1][2]

These are tunnels or "galleries" that have been built behind the counterscarp wall inside the moat or ditch. Each gallery is pierced with loopholes for musketry, so that attacking forces that enter the moat can be directly fired upon. Counterscarp galleries were usually built into the angles of the ditch to give the widest field of fire. Occasionally, casemated artillery batteries were built into the counterscarp, but they were more commonly designed for infantry weapons only. The galleries were usually connected to the main body of the fort by a tunnel which passed under the ditch, or by a caponier, a gallery built across the floor of the ditch.[3]