Medieval castles were usually defended by a ditch or moat, crossed by a wooden bridge. In early castles the bridge might be designed to be destroyed or removed in the event of an attack, but drawbridges became very common. A typical arrangement would have the drawbridge immediately outside a gatehouse, consisting of a wooden deck with one edge hinged or pivoting at the gatehouse threshold, so that in the raised position the bridge would be flush against the gate, forming an additional barrier to entry. It would be backed by one or more portcullises and gates. Access to the bridge could be resisted with missiles from machicolations above or arrow slits in flanking towers.