um... I fail to see the connection between the two issues.
Look up “Andalusia”, which the Muslims called “al-Andalus”.
My remark is partly (but only partly) tongue in cheek. Al Qaeda claims Spain because Islam once ruled it. Muslim immigrants in Spain are pushing for the right to worship in some key Spanish cathedrals because they sit on the site of an ancient mosque. There is a muslim push-back with Spain helped along with wide-open illegal immigration.
Now, the Ceuta and Melilla issue, the king might be right. They are two enclaves in Morocco that are Spanish. Morocco does claim them, and does point to the parallel with Gibraltar to buttress their claim.
Of course, Morocco claims about half of Saharan Africa.
It will depend on how robust and confident the Spanish are prepared to be, to demand Gibraltar and refuse to cede Ceuta. As it is, they are a source of illegal immigration as Africans crawl over the fence into the enclaves and then just ride the ferry to Spain.
Both are remnants of the old colonial regimes.