The Kingdom of Gibraltar was one of the many historic substantive titles pertaining to the Castilian monarchy and its successor, the Spanish monarchy, belonging to what is known as Grand Title. It was added to the monarchy titles by the kingHenry IV of Castile, upon the addition of Gibraltar to the Crown patrimony in 1462.. As from 1713 the title passed to the Crown of Great Britain. Many titles belonging to territories that are no longer under the sovereignty of the Spanish Monarchy, the title of "King of Gibraltar" is no longer kept in the titles and honours of the Spanish Crown and is not among the titles of the present king, Felipe VI, as the town Gibraltar was ceded to the British Crown under :s:Peace and Friendship Treaty of Utrecht between Spain and Great Britain#ARTICLE X|Article X of the Treaty of Utrecht 1713.
History
During the Middle Ages, Gibraltar was part of the MoorishTaifa of Málaga in Al-Andalus. It was ruled by Abdul Malik, son of the Marinid dynasty, between 1333 and 1340. After an unsuccessful siege led by Alfonso XI of Castile during the Reconquista period, Emir Isa Ibn al-Hassam proclaimed himself "King of Gibraltar and its lands" in 1355. The kingship remained in Muslim hands for the next century. Gibraltar was finally captured by Castile on 15 December 1462 when it fell to an army led by the Duke of Medina Sidonia, who expelled the Moors from the territory. King Henry IV of Castile, the brother of the later Queen Isabella I of Castile, rewarded the duke with the title of Marquess of Gibraltar and added the kingship of Gibraltar to the list of titles of the Castilian crown. The title can no longer be used by his successors as the territory was ceded to the Crown of Great Britain in perpetuity under the terms of the Treaty of Utrecht of 1713. The United Kingdom, by contrast, takes the position that the treaty transferred sovereignty as well as possession. When Gibraltar was captured by an Anglo-Dutch fleet on behalf of the Archduke Charles, claimant to the Spanish throne, in 1704, the city council and most of the population left, founding in 1706 the nearby town of San Roque. The original royal warrant of 1502, which the city council took with it to San Roque along with Gibraltar's standard and records, is now in the San Roque municipal archives. San Roque still uses a modified version of the original coat of arms of Gibraltar to symbolise its connection with Gibraltar. As with the rest of the historic substantive titles pertaining to the Spanish monarchy, this title is not officially designated in the 1978 constitution, but the constitution notes that the title of the King is King of Spain and further grants the right to use "the others pertaining to the Crown". This title is not "pertaining to the crown" of Spain. The Spanish Constitution has no competence to authorise the use of foreign titles belonging to other Monarchs. As the kingship of Gibraltar is no longer among the titles of the Spanish monarchy, it was customary for titles and arms of conquered territories to be omitted from British regnal claims. The title and arms were can only properly be used by the British monarchy. In 2010 the government of Gibraltar issued coinage using the title 'Queen of Gibraltar'. The title now appears on most Gibraltar and UK government documents referencing the Queen in relation to Gibraltar, which is the British Queen Elizabeth II.