<P> A maritime flag is a flag designated for use on ships, boats, and other watercraft . Naval flags are considered important at sea and the rules and regulations for the flying of flags are strictly enforced . The flag flown is related to the country of registration: so much so that the word "flag" is often used symbolically as a synonym for "country of registration". </P> <P> Ensigns are usually required to be flown when entering and leaving harbour, when sailing through foreign waters, and when the ship is signalled to do so by a warship . Warships usually fly their ensigns between the morning colours ceremony and sunset when moored or at anchor, at all times when underway, and at all times when engaged in battle--the "battle ensign". When engaged in battle a warship often flies multiple battle ensigns . This tradition dates from the era of sailing vessels . Tradition dictated that if a ship lowered its ensign it was deemed to have surrendered . Masts were targets of gunfire, and the second and subsequent ensigns were flown in order to keep the ensign flying even after a mast hit . </P> <P> Jacks are additional national flags flown by warships (and certain other vessels) at the head of the ship . These are usually flown while not underway and when the ship is dressed on special occasions . Jacks in the Royal Navy must be run up when the first line is ashore when coming alongside . </P>

Signal flag displayed by a vessel about to leave port