A Maltese community has existed in Gibraltar since shortly after its capture by an Anglo-Dutch fleet in 1704. Gibraltar, Malta and Cyprus were the three stepping stones whereby Great Britain controlled the Mediterranean and the vital route to the Suez Canal and thence to India. When the British conquered Gibraltar, the majority of the Spanish inhabitants fled and sought refuge principally in the nearby Spanish town of San Roque, leaving behind a garrison to be serviced by immigrants, mostly from Malta and Genoa. Immigration from neighboring Spanish towns soon followed giving the colony a very cosmopolitan population. Years of coexistence and intermarriage on the Rock soon led to a coalescence of Maltese, Italian and Andalusian culture, preserving the Mediterranean and Catholic uniqueness of the colony despite centuries of British occupation.
Gibraltar prospered by the arrival of 19th century trade with North Africa and the presence of the Royal Navy. This prosperity attracted immigrants from neighbouring Mediterranean lands and in 1885 there were about 1,000 Maltese people living on the Rock. Early in the 20th century the British undertook vast naval works and improvements to the existing fortifications of Gibraltar to make the colony practically impregnable. The naval base in Gibraltar was to prove its strategic value in the two world wars. It was only to be expected that, given the common cultural bond between Malta and Gibraltar, some Maltese would be lured by the prospect of lucrative employment there.
By 1912 the total number of Maltese living in Gibraltar was not above 700. Many worked in the dockyard and others operated businesses which were usually ancillary to the dockyard. However, the economy of Gibraltar was not capable of absorbing a large number of immigrants from Malta and by 1912 the number of Maltese was already in decline as they returned to the Maltese Islands. Eventually those who stayed in Gibraltar became very much involved in the economic and social life of the colony, most of them also being staunch supporters of links with Great Britain. The situation in Malta was very different, where a rising sense of nationalism resulted in the eventual establishment of the Maltese republic.