As Gibraltar is a British overseas territory, its sole official language is English, which is used by the Government and in schools. The eponymous Gibraltarian English accent is spoken in the territory.
Most locals are bilingual, also speaking Spanish, because of Gibraltar's proximity to Spain. Most Gibraltarians converse in Llanito, their vernacular which is mostly based on Andalusian Spanish but with numerous loanwords from English as well other Mediterranean languages. However, because of the varied mix of ethnic groups which reside there, other languages such as Moroccan Berber, Moroccan Arabic and Hindi are also spoken on The Rock.
Llanito (pronounced [ʎaˈnito]) is the main local vernacular, and is unique to Gibraltar. It consists of an eclectic mix of Andalusian Spanish and British English, as well as languages such as Maltese, Portuguese, Italian of the Genoese variety and Haketia.
Andalusian Spanish is the main constituent of Llanito, but is also heavily influenced by British English. However, it borrows words and expressions of many other languages, with over 500 words of Genoese and Hebrew origin. It also typically involves code-switching to English.
Over the course of its history, the Rock of Gibraltar has changed hands many times, among Spanish, Moorish, and British hands, although it has been consistently under British control since the Treaty of Utrecht in 1713. Before the British takeover, Spanish was widely spoken, but afterwards as most residents left the Rock, the language had a much smaller population (in 1753 there were just 185 Spaniards, and only 134 in 1777). However, the border with Spain has been opened since 1985, allowing easier travel in and out of Spain, one of the factors which has given Andalusian Spanish considerable presence in Gibraltar. In 2001, there were 326 people of Spanish nationality in Gibraltar, and a large number of "Frontier Workers" who commute there for work.
In 2001, there were 961 Moroccans in Gibraltar.
Hindi and Sindhi is also spoken by the Indian community of Gibraltar. Maltese, a language which was widely used in Gibraltar up until the late 19th century, and is still spoken by some families of Maltese descent. Similarly, Genoese was spoken in Catalan Bay well into the 19th century, dying out in the early decades of the twentieth. Hebrew is also spoken by the Jewish community.