Gibraltar is a British Overseas Territory. It has its own political system but issues like defence and foreign affairs are determined by the UK Government in London.
The Rock of Gibraltar