The motion of an air cavity, formed when a gate is opened at the lower end of a nearly horizontal, water-filled square duct, is compared to a gravity current, formed by the interaction of two liquids of differing density. If the gate is opened to the full depth of the duct, the front of the cavity has the same shape and speed as a gravity current. Behind the front, a quasi-steady, gradually varied flow extends to the outlet. If the gate is only partially opened, it forms a weir at the lower end that controls the depth of the outflow. A low weir produces a jet deflection and no effect on the cavity shape. As the height is increased, a level is reached where a hydraulic jump is formed. If the weir height exceeds a value dependent on the duct slope, the free surface touches the roof and seals the cavity. The isolated air cavity then progresses upstream and a new cavity forms at the opening. Simple analyses can predict the shape and propagation speed of a cavity created by free overfall and some of the physical characteristics of a cavity created when a weir controls the outflow depth.