Recently I've run across two articles by Derek Latham on the history of Ceuta, one in
Israel Oriental Studies 2, and the other in
Islamic Quarterly XV. It struck me that this picture shows several elements which have made Ceuta important over the centuries.
On the right, you see Mt. Hacho, atop which today sits a Spanish fort. The Spanish took Ceuta in 1415, and still control it today. The mountain, of course, makes for easy defense, especially since the peninsula on which it sits is curved, making for the nice protected harbor you see in this picture with the two boats out probably fishing. According to Latham, the city was difficult to lay seige to because fishing was an important industry, and it was hard to block off access to the harbors.
On the left is the Ceuta ferry terminal, where many ferries a day depart for southern Spain. When the Mediterranean was the western world's major commercial highway, Ceuta was among its busiest ports, a mercantile city much like the Italian city-states. Only with the rise of Atlantic trade did Tangier begin seriously to compete for influence.
What's more, Ceuta has historically been a gateway to Europe rather than one to Africa. As noted above, the city was difficult to take, but even after it was taken, the mountains surrounding it meant that you couldn't easily advance into the Moroccan interior. However, many invasions of the Iberian Peninsula and reinforcements of Muslim positions there were launched from its harbor. In fact, one could take this "gateway" pattern even up to the present, where desperate African economic migrants try to use it as a stepping-stone to continental Europe.
These historical and geographical factors make the competing Spanish and Moroccan claims to the enclave more complex than it might first appear. The Moroccan claim draws its legitimacy primarily from geography, in that everything on the North African coast is properly the territory of North African states. Spain, on the other hand, claims it not primarily on the basis of the 1415 conquest, but rather as part of a broader claim to the territies of the 10th-century Umayyad caliphate of Cordoba.
Spain is thus trying to claim an Islamic legacy rather than one based on the nationalism of the Reconquista, setting itself up as a successor state to the Muslim states it replaced. The existence of local Spanish festivals commemorating the Reconquista in anti-Muslim ways, however, perhaps make that identification problematic. At the same time, the political situation at the Strait of Gibraltar never truly depended solely on religious identifications. Christian and Muslim states made alliances with each other against their co-religionists on a regular basis. What's more, its defensible nature often meant that Moroccan control of Ceuta was often merely nominal, with local governors or the independent Azafid dynasty giving at best a formal allegiance to Fez or Marrkesh, and often none at all.
This is not to deny that Ceuta has figured prominently into Moroccan history, not only for its commercial presence, but for its cultural development as well. The Moroccan celebration of the Prophet's birthday appears to have been first introduced by the Azafids of Ceuta in the 13th century. However, set against such importance and that fact that Spain has to essentially bribe its citizens into living there is the pragmatic sense that in Ceuta Spain is simply controlling its own doorway, one whose political ties to Moroccan polities have historically been not much stronger than cities north of the Strait which are not in dispute.
In reality, of course, the dispute today rests not on all these ideological justifications, but on Moroccan and Spanish nationalism influenced in the 20th century by the reality of colonialism of which the Crusades and the Reconquista can be seen as a historical precursor. All of which is to say that there really is no clear right and wrong approach to this issue - Spain is not clinging to a piece of clearly Moroccan territory, but nor is Morocco out of line in asserting its own ties to the enclave. In a period of shifting boundaries, conquest and counterconquest, this is where the line happened to end up, at least for now.