The region was intensely isolated from the world and, although it never had the importance of the southern zone of al-Andalus, it was the most important centre of Islamic culture, science and technology in the lands of present-day Portugal. The city of Silves was its main cultural center, in 1027 it constituted the taifa of Silves, which occupied the western part of the current Algarve, while in the rest of the region the taifa of the Algarve was created.
The region was extracted by the Taifa of Seville, during the reign of al-Mutadid, king who inherited the expansionist policy of his father Abu al-Qasim. In 1051 Seville annexed the taifa of the Algarve and in 1063 the taifa of Silves. After the Almoravid invasion, a new union of al-Andalus took place, which ended in 1145, when the kingdoms of taifas reappeared. Silves’ taifa then spread to the centre of the Algarve while the eastern end was occupied by the Huelva taifa.
In 1150 it was produced from an old union of al-Andalus under the Almohads. With the disintegration of the Almohad empire, the area of the current Algarve was part of the Niebla taifa, governed by Ibn Mahfot, where it remained until the Portuguese conquest. King Sancho I of Portugal ephemerally conquered the city of Silves in 1189 (she was said to be ten times greater than Lisbon), but it was not until 1249 that King Alfonso III of Portugal finally conquered the Algarve and proclaimed himself king of Portugal and the Algarve.
After the Treaty of Badajoz, in 1267, the Portuguese possession of the Algarve was recognised by the Kingdom of León and the Kingdom of Castile. The Kingdom of the Algarve was part of the Kingdom of Portugal, which did not imply any autonomy for the region. The official name of the kingdom was often called “Kingdom of Portugal and the Algarves” or United Kingdom of Portugal, Brazil and the Algarve, but it never constituted a de facto separate kingdom, although it was by right, known as the Kingdom of Algarve. With the proclamation of the Portuguese republic in 1910, the kingdom of the Algarve ceased to exist.
In 1807, when General Junot led the invasion of northern Portugal, the Algarve was occupied by the Spanish troops of Manuel Godoy, who were expelled the following year during the Olhão rebellion.