A device for automatically securing a cargo container to a support such as a deck of a vehicle or a second container with which the first container is to be stacked. The device includes a base having a projecting shear block received in the locking opening of the container. A head rotates between an unlocked or loading position in which the head moves through the locking opening and a locked position in which the container is secured. Automatic entry and release are provided by a spring within the base biasing the head to the locked position but permitting movement to the unlocked position when torque is applied by engagement of the container with a cam surface on the head. Visible indication of the locked position and positive locking of the head in the locked position may be provided. For stacked containers, two aligned shear blocks and two angularly offset heads are provided and the spring may be released for manual locking of the device to one container followed by automatic locking to the second container.