What country was Cuba a territory of?