The history of Algeciras, a Spanish region, can be traced back to initial Paleolithic outdoor settlements. In antiquity, Algeciras was home to two significant settlements: the Roman city of Iulia Traducta, which served as an important commercial hub, and the city of , the first Arab settlement established in the peninsula. Following a three-century period of abandonment, a new city of Algeciras was re-founded in 1704.

The most noteworthy aspect of its history is the uninterrupted process of development and destruction of the various settlements that have constituted it. Consequently, the city would have undergone at least three periods of abandonment and destruction: during the transition from Carthaginian to Roman occupation, from Byzantine to Muslim rule, and from the latter to Spanish occupation in the modern era.

During the Middle Ages, an era of considerable prosperity and architectural grandeur for the city, it would have also endured at least four significant sieges.

The history of Algeciras attests to its strategic and cultural significance over centuries, making it one of the most influential cities in Spanish history. In the present era, Algeciras has become the primary seaport of Spain and is among the most populous and fastest-growing cities in Andalusia, having been repopulated within the past three centuries.

Prehistory

A considerable number of lithic tools have been unearthed, some of which were discovered in the city's Villa Nueva. The site of the Palmones river wharf, which was excavated in 1994, yielded numerous flint and protoquartzite tools dated to the Acheulean period, as well as the site located in the vicinity of Playa de Getares, which also yielded significant findings.

The presence of Neanderthal man on the northern shore of the Strait of Gibraltar is confirmed in the paleontological record by the discovery of several remains in several caves of the Rock of Gibraltar. In the municipality of Algeciras, a single isolated lithic industry associated with Homo neandertalensis has been found around the El Saladillo stream, which would place groups of hunter-gatherers belonging to this human species in the region.

The majority of the prehistoric sites in the area date back to the Paleolithic and Neolithic periods. The archaeological record also includes several hand axes from the Solutrean period in the Torrealmirante area and in Punta Carnero, indicative of hunter-gatherer societies.

In the area around the city there are shelters with rock art dating from the Palaeolithic to the Late Roman period, called , or "southern art."

Ancient history

Punic period

The neighboring city of Carteia played a significant role in the Carthaginian world since its foundation in the 4th century B.C. It was especially renowned for its economic strength as a stopover on the sea route that linked the cities of Malaka and Gades. As a result, any reference to another town in the Bay of Algeciras is largely absent from the historical sources. Modern archaeology employs the consistency of Phoenician-Punic settlement patterns to identify new sites. It is therefore evident that they deliberately selected locations for the construction of ports and even cities. In this way, they almost invariably sought a promontory in close proximity to the coast, easily defended by land and sea, and with access to running water. The excavation of sites in locations that meet these criteria has revealed numerous findings that were previously overlooked in written sources. The Punic site of Cala Arenas and other smaller sites still under study in the municipality of Algeciras were located in this context. This coastal landmark, situated to the west, is believed to have served as a point of sustenance and a temporary halt before or after traversing the Strait of Gibraltar.

The evidence suggests that a small city or port existed in the urban center of Algeciras since at least the 5th century B.C. This is evidenced by the discovery of Attic pottery in the Villa Nueva area of the city. It is thought that this was the origin of the later Roman city of Iulia Traducta. The possibility of the existence of a settlement, perhaps a temple to Melqart in Isla Verde, a few meters from Río de la Miel, is also considered by some experts.

Roman period

A total of three Roman settlements have been identified in the city through the combination of classical sourcesInterpretation of the Antonine Itinerary. and the archaeological record. The interpretation of the sites with the names provided by geographers of the time is a topic of debate among experts. Three toponyms are known from this period: Iulia Traducta, and . These are located with varying degrees of certainty in three different areas of the city;

Iulia Traducta Located beneath what is currently the Hotel Reina Cristina in the Villa Vieja. A number of historians have previously proposed that the city in question could not be Algeciras, largely due to the absence of Roman remains. However, recent findings have challenged this assertion. In the mid-20th century, for instance, the discovery of Roman structures, sewage system remains, and column bases beneath the aforementioned hotel led to the interpretation of this area as the city's acropolis. Next to it, the industrial complex for the elaboration of garum of the Roman fish salting factory in the current street of San Nicolás, dating from the 1st century, and formed by several small independent factories of greater or lesser size within a building or enclosure that would close an industrial neighborhood. The port is usually located in the estuary of the Río de la Miel, where it was also located in the Middle Ages until its silting. There is often talk of a neighborhood associated with the port in the lower part of the Villa Nueva in alluvial areas as an explanation for the specific deposits of the 1st century located there. According to the chronicles the city was populated in Roman times with people from Tinjis (Tangier) and Zilis, as a measure of punishment to this North African city for the insurrections against the empire that had starred, hence the name of Iulia Traducta. It was also called Iulia Ioza, Ioza is a Punic word that would mean "transported", like traducta obvious duality if you think that the North African citizens who lived in the city would maintain their own language. It is also called by Pomponius Mela Tingentera, or Tinjis Altera, the other Tangier according to some historians.

Caetaria In the Playa de Getares, just twenty meters from the coast, remains of buildings and pools for the manufacture of garum have been found. In addition to these structures, toponymy allows to locate the city of Caetaria, Cetaria or Cetraria, a name that comes etymologically from ketothereía or "place of cetaceans", and from where the current name of Getares would come from, documented as Xetares in the rhymed chronicle of Alfonso XI of Castile in the 14th century. The archaeological evidence allows for the dating of the Cetaria remains to the interval between the 1st and 5th centuries. It also suggests that this was a period during which the fishing industry in the area was significantly disrupted, potentially as a result of the prevalence of barbarian raids in the region.

Portus Albus In the 1960s, the remains of two amphora manufacturing furnaces were discovered to the north of the city, adjacent to Playa de El Rinconcillo.The amphora manufacturing furnaces have remained underground since their discovery by Manuel Sotomayor. These furnaces were part of an industrial complex that included at least two additional potteries, which were uncovered through private excavations. The city of Portus Albus, mentioned in the Antonine Itinerary as a mansion located six miles from Carteia and identified by some scholars as a small village whose economy was based on fishing and salt production, may have been discovered in this northern area. This is based on the discovery of structures for saltworks in the mid-20th century, which could be considered a complementary industry to the garum manufacturing industries of Iulia Traducta and Cetaria.

Middle Ages

Barbarians and Byzantium During the last years of the Western Roman Empire barbarian incursions reached the Strait region. The Mauritanians in 172 to 175 during the rule of Marcus Aurelius and in the period 193 to 211 with Septimius Severus ravaged the area. In 280 being Emperor Gallienus there was the passage of the Suebi, Germanic and Franks. In 429 the Vandals, in a number of 80,000 according to the sources of the time, passed the Strait of Gibraltar to settle in the territories of ancient Carthage. One of the ports used was that of Iulia Traducta but also that of Carteia. According to the chronicles, before moving on to Africa, they seized all the ships they found in the area, stocked up on provisions and destroyed those installations that could represent a future danger in the form of a new invasion, especially the port and the shipyards. There is hardly any archaeological evidence from this period, which leads us to believe that the area was practically unpopulated for at least two centuries. The southern part of Hispania was controlled by the Suebi until the arrival of the Visigoths in 454.

Gothic control in the southern fringe of the peninsula was maintained until 557 when the Byzantine Empire occupied the region in its attempt to recover the ancient Western Roman Empire. The presence in the city was scarce and there are archaeological references such as the discovery of a Visigothic-Byzantine cemetery in the Villa Vieja of the city,Part of the Byzantine cemetery was moved to the municipal museum for further detailed study. and of a Byzantine chalice in the surroundings of the later Aljama Mosque (later Arab sources indicate that a mosque was built on the site of a pre-existing church), also in the Villa Vieja. In any case, the Byzantine presence in this area of Andalusia was very limited. The Byzantines remained in the region until 622, the year in which the Visigoths returned to control the area.

Arab period and foundation of the city

In 711 the Arab troops commanded by Tarik landed on the Iberian Peninsula and, after occupying the rock of Gibraltar (Ghebel Tarik or Mount Tarik) and the city of Carteia, arrived near the city of Algeciras. Here they established a base on the Isla Verde leaving a small detachment and the favorite of Tarik called Umm Hakim, which gave name to the place (Al Yazirat Umm Hakim or island of Humm Hakim). After the first days of the troops on the peninsula and after noting the little opposition from the Hispanics, the camp was moved to land, and with the name of , the Isla Verde, they established the bases of the new city.

Since its foundation it was a fundamental city for the Muslim cause as it was the main gateway to Europe from Africa and soon the city saw its number of inhabitants grow mainly with Arab soldiers passing through for the war.

The city was the scene of Berber revolts during the second half of the 8th century. Thus, in 741 the emir of al-Andalus asked the Syrian nobleman Balch for help in putting down a Berber revolt against the central power. These insurrections took place due to the non-fulfillment of the agreements by which the Berbers were to receive plots of land with which to settle in the peninsula. The nobleman brought with him about 6500 soldiers through the port of al-Yazirat, the emir of al-Andalus asked that the main nobles remained in the city as a guarantee that the Syrian was not going to occupy any land but simply to help in the fight. Once finished this Balch knew that his nobles had not been well treated during their confinement in the city and marched towards Cordoba where he killed the emir.

Emirate of Cordoba