Complex sentence: Governor Montiano in the meantime had prepared well the defenses of the Castillo and the Spanish colony, by having all the inhabitants of the city take refuge inside the castle, while he held the British at bay.
Split into simpler sentences: Governor Montiano in the meantime had prepared well the defenses of the Castillo and the Spanish colony. Montiano had all the inhabitants of the city take refuge inside the castle, while he held the British at bay.