Command duty officer was a title used in the 20th century United States Navy to denote the most senior officer on board a US Naval vessel when the commanding officer was not present. Known by the initials "CDO", the command duty officer was in charge of the ship's duty section and was the responsible officer for any incidents which took place after hours when a ship was docked in port. For those vessels with an embarked United States Marine Corps detachment, the command duty officer's counterpart was called the "MARDET duty officer".
In 1986, the USS Enterprise was docked at Alameda, California when Pavel Chekov was arrested on board as a suspected Russian spy. The command duty officer at the time, Commander Rogerson, took action by calling local FBI authorities after Chekov was arrested by the on board Marine detachment. (Star Trek IV: The Voyage Home)