The establishment of the first fortress was constructed in the 7th century B.C.E., from the remains of Phoenician, Greek and Carthagninan remnants that were built on a Lusitanian castro settlement. The Carthaginan fort was conquered by Hannibal in 436, who renamed the fortification Portus Annibalis, which would later be re-christened Barcínia. From excavations completed by Teresa Gamito, the author determined that Alvor was an ancient populational and commercial centre during the pre-Roman colonization. Roman conquest did not alter significantly Alvor's role. The Moors finally conquered Alvor in 716, but the settlement retained its important political and commercial role that it acquired during the earlier cultures. King Sancho I of Portugal destroyed the fort in 1189, when his forces swept away resistance from Moorish forces. It was a temporary success: the region was retaken in 1191 by the Moors. In 1250, King Afonso III finally settled this territorial dispute by sacking Alvor. In order to maintain their conquest, King Denis ordered the reconstruction of the castle in 1300. Successively, Alvor was elevated to the status of town by King John II on 29 February 1495, which later allowed its deannexation from the municipality of Silves. Within ten years, on 13 December 1505, King Manuel issued a foral to the parish of Alvor. The apparent simplicity of the structure that survived to this day contrasts with the importance of the location during the Middle Ages. Current thinking suggests that the actual Castle of Alvor corresponded to the primitive square, that sheltered a garrison. Outside this redoubt circled the primitive settlement, which was itself circled by walls. At the time of the first conquest of Silves, Alvor was referred to as a dependent town, suffering from Christian incursions. Within the Christian sphere, Alvor became one of the principal localities of the Algarve. Yet, the few notices survive to this day of the military preparedness of the castle or its garrison. It was in Alvor that King John II died, his body eventually transferred to the Sé Cathedral in Silves, before being interred in the Monastery of Batalha. It was only in the 17th century that a further understanding of the structure can be determined. In 1621, during a period of intense reform carried out after the Portuguese Restoration War, Alexandre Massaii first referred to Alvor castle as a " small, square fort". The preoccupation with the defense of the Algarve suggested that this fort was abandoned in favor of concentrating forces in large, complex forts in strategic points along the coast.Left in abandon, the castle was successively threatened by the encroachment of the town, as a number of residences were constructed within and without its walls. The 1755 Lisbon earthquake was responsible for the complete destruction of the castle, resulting in its current vestiges. At the end of the 20th century, a children's playground was constructed in the interior of the main square, an act that was seen as a commemoration of the Christian conquest of the town. The attempt to identify the hidden defensive systems of Alvor continue. An archaeological excavation of the hill discovered the remnants of the fortress of Ipses, located in front of the matriz church, revealing levels of Moorish occupation. These excavations revealed that the castle of Alvor was actually complemented by other secondary redoubts, located closer to the coast.
Architecture
As an ancient river community, the region was conditioned by a privileged position: it had access to the sea and interior territory, across many of the ravines and rivers that cross the region and protected by a dominant mountain. Alvor was, since this early period, a reference for many of the smaller populations that developed along the eastern maritime coast east of the River Arade. The structure was installed on a hilltop: a rectangular plan, the castle's walls continue to exist after many years of wear and ruin, comprising many blocks of irregular forms. A perceptible path still circles this structure, identifiable by a staircase located along the southern wall, but the vertical extent of this wall is clouded by limited vestiges. The main gate, aligned to the north, was constructed during the Renaissance, defended by a tower. On the eastern wall is the remnant of another tower, with a panoramic view of the sea.