Why was the rock of Gibraltar an important territorial location?

Ait had rumored god reserves
Bit was full of natural resources
Cit was of religious significance
Dit resided in a strategic position