Taifa of Albarracín

It was led by the Berber dynasty of the Banu Razin tribe, which arrived in the peninsula after the conquest of Spain by Tariq ibn Ziyad.

In 1167, under the pressure from the ongoing wars between the Almoravids and the new invasions by the Almohad Caliphate.

The Moorish King Muhammad ibn Mardanis ceded the Taifa of Albarracín to a vassal of Sancho VI of Navarre, a noble from Estella-Lizarra named Pedro Ruiz de Azagra.

In 1172, Pero Ruíz d'Azagra managed to consolidate his power over the Señorío making that territory independent of the other Christian kingdoms in the region.

In 1190, with the signing of the Borja Accords, between Alfonso II of Aragon and Sancho VI of Navarre, the two monarchs agreed to a defensive pact against Alfonso VIII of Castile which gave official legitimacy to the Sinyoría d'Albarrazín with respect to the two kingdoms.