The strange history of Albarracín: a Berber taifa, a Wolf King and a vassal of the Virgin
History · Albarracín

The strange history of Albarracín: a Berber taifa, a Wolf King and a vassal of the Virgin

How a mountain village managed to obey neither Castile nor Aragon for more than a century, and to wring a bishopric of its own out of the pope along the way.

8 min read · Updated for 2026
🎧 On the walk Red Albarracín: the village clinging to the rock

On the medieval peninsula, between two kingdoms that fought over everything, there was one mountain village that managed to depend on neither. Its history takes in a Berber family, a Muslim warlord nicknamed the Wolf King, a declaration of vassalage to the Virgin and a cathedral that ought not to exist.

The legal trick: if you are a vassal of Santa María, no flesh-and-blood king can demand obedience of you. It worked for more than a hundred years.

The Banu Razín, and the name of the village

It all begins at the castle, above the river bend. The Muslim alcázar was planted here more than a thousand years ago, and in the eleventh century, after the fall of the caliphate of Córdoba, this territory became one of the many taifas into which al-Andalus fragmented.

It was governed by a Berber family, the Banu Razín. And that is where the place name comes from: “Al Banu Razín”, the land of the Razín, was gradually deformed in people's mouths until it became Albarracín. The name of the village is literally the surname of its eleventh-century lords.

The geography explains why they lasted: the village is coiled inside a bend of the Guadalaviar, almost an island of rock, with a single tongue of land to get in by. Whoever held the crag held Albarracín, and taking it cost far more than it was worth.

The excavations at the castle have brought to light a complete Andalusi quarter: the palace courtyard, the domestic rooms and a hammam with its hypocaust, a bathhouse with underfloor heating. It can all be visited.

1Albarracín Castle

Albarracín Castle

📍 Hill above the river bend

The alcázar of the Banu Razín, with an Andalusi quarter and a bathhouse with a hypocaust brought to light by the excavations. Forty-five minutes.

2Church of Santa María

Church of Santa María

📍 Old quarter

The symbol of independence: Azagra declared himself a vassal of the Virgin so as not to submit to any king. And the church formed part of the wall.

🎧 With Viavoy

Explore Albarracin at your own pace

Download the app and discover Albarracin offline, whenever you like. Take the walking tour Red Albarracín: the village clinging to the rock with a local guide in your ear.

Find out more about Viavoy →

The Wolf King and the vassal of the Virgin

In the twelfth century Pedro Ruiz de Azagra, a Navarrese nobleman, comes on stage. And here is the unusual part: Albarracín was not given to him by any Christian king, but by a Muslim one. The story goes that it was Ibn Mardanish, the powerful “Wolf King” of Valencia and Murcia, who handed him the lordship.

Ibn Mardanish was a fascinating figure: he governed a broad territory of the Levante in opposition to the Almohads, allied himself with Castile and Aragon against them and kept a court with a strong Christian influence. That he should cede Albarracín to a Navarrese nobleman fits perfectly with his policy of alliances.

And that gave Azagra the legal argument he needed: since he owed the lordship to neither Castile nor Aragon, he owed vassalage to neither of them. So he declared himself a vassal of Santa María alone, of the Virgin herself.

In an age when vassalage required one specific lord, choosing the Virgin left the kings with no grounds to make a claim. That is why the church of Santa María is not just another church: it is the founding document of the lordship's independence.

And that is why the Marian dedication appears everywhere in the village and in the district. It is not simply devotion: it is a political argument repeated over centuries.

A cathedral, and the end

Political independence needed religious independence, because in the Middle Ages ecclesiastical jurisdiction was as real as civil jurisdiction. Depending on someone else's bishopric meant depending on another power.

So in 1172 Azagra obtained a bishop of his own for his land. That is the reason a village of shepherds has a cathedral: it was one of the smallest dioceses in Spain and it existed for reasons that were not demographic.

The building you see today is later: it was built in the 16th century with the master Martín de Castañeda and the Frenchman Pierres Vedel, the same engineer who brought water to Teruel. A single nave, broad and luminous, between late Gothic and the Renaissance.

The end came in 1284, when King Peter III of Aragon laid siege to the stronghold and incorporated it into the Crown. That closed an extremely strange story: that of a small lordship which for more than a century obeyed no king.

The bishopric held out longer: in time it could not go on alone and ended up joined to neighbouring Teruel, with which it shares a bishop today. But the cathedral stayed here, as a witness to when this village had a mitre of its own.

3Cathedral of the Saviour

Cathedral of the Saviour

📍 Upper part of the village

The bishopric was obtained in 1172; the present building is from the 16th century, by Pierres Vedel. It keeps Gothic paintings that time had left hidden.

4Andador Tower

Andador Tower

📍 Highest point of the walled enclosure

Tenth-century stone, from the time of the caliphate. From the top you see the whole river bend and you understand why this place was so hard to take.

Frequently asked questions

Who were the Banu Razín?

A Berber family that governed a taifa here in the eleventh century, after the fall of the caliphate of Córdoba. The village's name comes from theirs: “Al Banu Razín”, the land of the Razín, was gradually deformed until it became Albarracín. Their alcázar stood on the hill above the river bend, where the castle is today.

Who was the Wolf King?

Ibn Mardanish, a powerful Muslim warlord who governed Valencia and Murcia in the twelfth century, in opposition to the Almohads and allied with Castile and Aragon against them. The story goes that it was he who handed Albarracín to Pedro Ruiz de Azagra, a Navarrese nobleman, which fits with his policy of Christian alliances.

How did this vassalage to the Virgin work?

In the Middle Ages vassalage required one specific lord to whom obedience was owed. Since he had not received Albarracín from any Christian king, Pedro Ruiz de Azagra was able to declare himself a vassal of Santa María alone, and no flesh-and-blood monarch had any legal grounds to demand his submission. It worked for more than a century.

Why did they need a bishopric of their own?

Because in the Middle Ages ecclesiastical jurisdiction was as real as civil jurisdiction, and depending on someone else's bishopric meant depending on another power. By obtaining a diocese of its own in 1172, the lordship completed its independence. That is the reason a village of shepherds has a cathedral.

When did Albarracín's independence end?

In 1284, when King Peter III of Aragon laid siege to the stronghold and incorporated it into the Crown of Aragon. That closed an uncommon story: that of a small lordship which for more than a century obeyed neither Castile nor Aragon, and which had not even received its territory from a Christian king.

What is left of the Muslim past?

Quite a lot. The Torre del Andador is from the tenth century, from the time of the caliphate, and it is the oldest stone in the village. And at the castle the excavations brought to light a complete Andalusi quarter, with the palace courtyard, the domestic rooms and a hammam with a hypocaust, that is, a bathhouse with underfloor heating.

Does the diocese of Albarracín still exist?

Not independently. It was one of the smallest dioceses in Spain and in time it could not go on alone: it ended up joined to neighbouring Teruel, with which it shares a bishop today under the name of the diocese of Teruel and Albarracín. But the cathedral stayed here, as a witness to when the village had a mitre of its own.

Practical information

Eleventh centuryThe taifa of the Banu Razín, from whose name the village's own comes.
Twelfth centuryIbn Mardanish, the “Wolf King”, hands the lordship to Pedro Ruiz de Azagra.
1172A bishopric of its own: independence in religious matters too.
The trickDeclaring yourself a vassal of Santa María, not of a flesh-and-blood king.
1284Peter III of Aragon lays siege and incorporates it into the Crown.
Where to see itThe castle, the cathedral and the church of Santa María, all three in the old quarter.

On the map

🎧 With Viavoy

Walk Albarracin and listen at your own pace

Download Viavoy and walk Albarracin offline, whenever you like.

from 3,99 €· one-off payment
City Pass · 9,99 €3 days, all the tours in Albarracin
Find out more about Viavoy →
Viavoy app

Keep reading

More articles

Itineraries

Albarracín in a day: the village that obeyed no king

Architecture

The walls of Albarracín: a village inside a river bend and a tenth-century tower

Food & drink

Eating in Albarracín: jamón de Teruel, ternasco and mountain cooking at 1,170 metres