A flag officer is both a historic naval and military rank and a modern Starfleet title. It generally refers to all officers of Commodore/Rear admiral rank or higher. The term flag officer stems from the historical naval practice that when a person of admiral rank was posted to a ship, a flag denoting his rank and presence was flown. In an age of visual signals, the ships under the admiral's command would look to the flagship for orders and instructions. The term traditionally denotes any officer that commands a squadron of starships, possibly in addition to one under their direct command.
Starfleet regulations as of the mid-23rd century stated that "when a captain is unfit, physically or mentally, a competency hearing is mandatory," convened by the first officer and headed by a Starfleet flag officer. Additionally, when all senior officers are incapable of commanding a starship, an individual of "flag rank is forced by regulations to assume command." (TOS: "The Deadly Years")
According to Captain Kathryn Janeway, with regards to the Omega particle and Omega Directive, "Only starship captains and Federation flag officers have been briefed on the nature of this threat." (VOY: "The Omega Directive")
Flag officer ranks in Starfleet
- Fleet Admiral
- Vice Admiral
- Rear Admiral (aka Rear Admiral, upper half)
- Commodore (aka Rear Admiral, lower half)