What a mess. Hopes that the United Kingdom will remain in its present form are slim to say the least. Both Scotland and Gibraltar have signalled that they wish to remain part of the European Union despite the referendum result. In fact, the government of Gibraltar has found an unlikely ally in the Scottish government as the two battle to remain part of the European club. There is no simple solution. Spain is seeking joint soverignty of Gibraltar in return for allowing it to continue to form part of the EU. Scotland is talking a new independence referendum.
Unfortunately for both of them, England is staying well clear of Brussels. There is a distinct possibility of the UK falling apart, with Northern Ireland joining the pro-European south, Scotland breaking away and tiny Gibraltar left alone. This problem is not going to go away. Gibraltar needs the EU more than the EU needs Gibraltar but perhaps it should be given a special status. I can't see any reason why the Scottish government should not be allowed to forge special relations with the EU but still remain part of the UK. It is just another example of all the problems which have been thrown up by Britain's exit. It remains a nightmare scenario. I sincerely doubt that the UK will survive in its present form following the exit.