An
ensign is a
national flag when used at sea as a country's
maritime flag. It serves as a distinguishing token, emblem, or badge, such as a symbol of office in
heraldry. The military rank of
ensign, a junior officer once responsible for bearing the ship's ensign, derives from it.