It is said that the custom of wearing a pennant at the masthead of a man-of-war stems from Tromp's broom and Blake's whip. During the First Anglo-Dutch War (1652–54), Dutch Admiral Maarten Tromp lashed a broom to his flagship's masthead as a sign that he had swept the English off the seas. In reply, English Admiral Robert Blake hoisted a whip to the masthead to signify that he would whip the Dutchman into subjection. However, records show that pennants were in use well before this period as the mark of a warship.
In the days of chivalry, knights and their squires carried pennons and pennoncells on their lances, just as men-of-war fly pennants from their masts. Records show that pennants were in use in the 13th century, when merchant ships were commandeered during war and placed in command of military officers, who transferred their trail pendants from their lances to the mastheads of the ships they commanded.
The pennant is an evolution of old "pennoncell", that in the Royal Navy used to consist of three colours for the whole of its length, and towards the end left separate in two or three tails. The tradition continued until the end of the Napoleonic Wars when the Royal Navy adopted the style of pennants used by the service today. Pennants have been carried by warships from the earliest times, prior to 1653 at the yardarm, but since then at the maintopgallant masthead.
Today the pennant is hoisted on the day a warship or establishment commissions and is never struck until the day of decommissioning. It is, however, displaced by Royal Standards and the personal or distinguishing flags or pennants of commodores and admirals. In Navy ships the pennant is flown at the masthead, for which reason it is also commonly referred to as a masthead pennant.