Albufeira originates from the Arab Al-buhera. It means castle of the sea. Alternately it originates from al-Buħayra, for the lagoon. This is a reference to the lagoon that formed in the lowlands. The Arabs constructed strong defensive structures. This made the area almost impregnable. Albufeira therefore remained in the hands of their forces longer than other possessions in Portugal.