About the Gibraltar flag

From the Gibraltar government website:

The flag of Gibraltar is an elongated banner of the Arms of Gibraltar, granted by Royal Warrant Queen Isabella of Castille on the 10th July 1502.

"An escutcheon on which the upper two thirds shall be a white field and on the said field set a red castle, and below the said castle, on the other third of the escutcheon, which must be a red field in which there must be a white line between the castle and the said red field, there shall be a golden key which hangs by a chain from the said castle, as are here figured"