Gibraltar is facing an "existential threat" to its economy if the UK negotiates a so-called ‘hard Brexit’ deal, the territory's chief minister has warned.

The British enclave on the Iberian peninsula relies upon thousands of Spanish workers crossing the border every day to work, and its economy could collapse if the UK ends free movement of labour after leaving the European Union.

In the June referendum, Gibraltarians voted by 96 per cent to 4 per cent to remain in the EU – a higher margin than in any voting district.

Now its political leaders are wondering whether the Rock can do what they call a ‘reverse Greenland’. Though Greenland is ruled by Denmark, which is a member of the EU, the island’s political leaders achieved a deal in 1985 under which it left the EU without severing its political links to Denmark.

In Gibraltar, the question is being raised as to whether the territory could remain in the EU when the UK leaves, while continuing to be a British Overseas Territory, its chief minister, Fabian Picardo told the BBC’s Today progamme.

"A hard Brexit would be really an existential threat to the Gibraltar economic model," he warned.

Brexit racism and the fightback Show all 9 1 /9 Brexit racism and the fightback Brexit racism and the fightback Demonstrators protest against an increase in post-ref racism at London's March for Europe in July 2016 PA Brexit racism and the fightback These cards were found near a school in Huntingdon, Cambridgeshire, the day after the EU referendum Twitter/@howgilb Brexit racism and the fightback LONDON, UK - JULY 16 : A speaker addresses the EDL members at Hyde Park. About a hundred members of The English Defence League (EDL) march on Park Lane for a rally in Hyde Park. The march on 16 July 2016 was heavily policed keeping the group away from the public. (Photo by David Mbiyu/Corbis via Getty Images) Getty Brexit racism and the fightback Romford, Essex, June 25 @diamondgeezer Brexit racism and the fightback A worker at this Romanian food shop was asleep upstairs at the time of this arson attack in Norwich on July 8, but escaped unharmed. Hundreds later participated in a ‘love bombing’ rally outside the shop to express their opposition to racism and their support of the shop owners. JustGiving/Helen Linehan Brexit racism and the fightback This neo-Nazi sticker was spotted in Glasgow on June 26 Courtesy of Eoin Palmer Brexit racism and the fightback But after news emerged of neo-Nazi stickers appearing in Glasgow, some in the city struck back with slogans of their own. Courtesy of Eoin Palmer Brexit racism and the fightback The Peoples Assembly Against Austerity, Black Live Matters and The Socialist Workers Party organised a march on Saturday July 16th in London, United Kingdom, against austerity, cuts and Racism. The groups also marched in solidarity against Tory government policies. (Photo by Gail Orenstein/NurPhoto via Getty Images) Getty Brexit racism and the fightback More signs began to appear in some parts of the UK, created by people who wanted to show their opposition to post-referendum racism Courtesy of Bernadette Russell

"What might be a disastrous exit for the United Kingdom would be an existential threat to Gibraltar's current economic model.

"We have been talking about this possibility of what has been described as a 'reverse Greenland' which envisages one part of a member state leaving the European Union because it chooses to do so and other parts of the member state remaining, with access to the single market and freedom of movement being the things that matter most to us.

"What Gibraltar is looking at is what type of participation we can have in the European Union or with the European Union, once the United Kingdom has decided what its Brexit looks like."

The Gibraltar government is already in discussions with Scotland, which also voted strongly for Remain, about what kind of arrangements they could have with the EU once the UK finally leaves.

Mr Picardo strongly rejected suggestions that it would have to concede some form of joint sovereignty to Spain – something it has long opposed – if it were to continue to enjoy unfettered access to EU markets and labour.