Complex sentence: When the British conquered Gibraltar, the inhabitants fled and sought refuge in the Spanish town of San Roque, leaving behind a place to be taken by immigrants, mostly from Morocco, Malta and the Italian islands.
Split into simpler sentences: When the British conquered Gibraltar the inhabitants fled and sought refuge in the Spanish town of San Roque. Their place was taken by immigrants, mostly from Morocco, Malta and the Italian islands.