Historia geológica Locality Ayerbe

Ayerbe turned the hill into a fortress and the plateau into a borough

The castle dominates the Hoya from San Miguel hill, while the town stretches farther south. What is it about Ayerbe’s topography that helps explain this change?

View of Ayerbe with the wooded terrain of the surrounding area in the background; the landscape helps locate the town between the Hoya and the nearby elevations.

View of Ayerbe with the wooded terrain of the surrounding area in the background; the landscape helps locate the town between the Hoya and the nearby elevations.

Photo: Zarateman, CC0 — commons.wikimedia.org

From San Miguel hill, Ayerbe Castle looks out over the Hoya. Below, the town spreads out far from the fortified heights. Local history raises a specific question: why was the first Ayerbe associated with a hilltop and, centuries later, did it also grow on a plateau farther south? The terrain offers a clue. It did not write history by itself, but it provided two very different settings: a mountain that was difficult to reach and a depression opening out among small hills.

The Hoya is not a motionless setting

Ayerbe lies in an erosional depression carved into Tertiary marl deposits, to the left of the Gállego River. Put simply, erosion wore down terrain made of marls—fine-grained rocks containing clay and lime—and left a basin dotted with isolated hills. It is a landscape of contrasts: relatively open surfaces alongside elevations that stand out above the plain.

Marls are generally associated with shallow, muddy seabeds, where sediments accumulated in calm waters. This is not a scene that can be seen today from the castle, but a way of reading the rock: those materials accumulated and, much later, were exposed and shaped by erosion. Ayerbe’s human history began in terrain that had already been sculpted over a span of time vastly greater than that of any kingdom.

Erosion does not build a wall around the town. But it can leave prominent hills beside lower ground. In Ayerbe, this contrast between the depression and the nearby heights helps explain why the castle occupies a commanding position above the Hoya. The hill’s elevation and difficult access probably made it an attractive site for watching over and defending the territory; this is a reading of the landscape, not in itself a documented historical explanation.

The municipal geotechnical profile adds another piece of information, distinct from the description of the terrain: it identifies sandstone, conglomerates and flysch as the predominant materials. They tell stories of different kinds of sediment. Sandstone forms when grains of sand become compacted and cemented together; conglomerates preserve rounded pebbles bound together, like those a fast-flowing river can leave behind. Flysch consists of alternating sandy and clay-rich layers, like pages of different textures stacked on top of one another. The geotechnical study assigns this group 76.26% of the ground types included in its classification.

This figure does not make the entire Hoya a single type of rock, nor does it invalidate the description of the marl depression: each classification looks at the terrain from a different angle. To follow the castle’s history, what matters most is the visible shape of the place: the height that commands the landscape and the flatter ground towards which the settlement could spread.

First, a height from which to defend the plain

The origins of the settlement call for caution, but the evidence points in a particular direction. The tradition of an ancient Roman manor called Ebellino has been questioned: the available historical reconstruction considers it more likely that the settlement developed in the Muslim period, on the summit of a hill beside a fortification. A local study also notes that it is difficult to establish when Ayerbe first became a populated settlement, and suggests that it may have had a military origin. The accounts agree on the importance of the hilltop; the precise details of the earliest settlements, however, remain unresolved.

In the Upper March, the territory associated with Zaragoza, the fortress would have served to protect the plains. According to the historical reconstruction of Ayerbe, a small settlement grew up under its protection to supply it. Geology cannot date the settlement’s beginnings, but it helps make the choice understandable: from the hill, the Hoya lies in full view, and the slope makes the climb an obstacle for anyone approaching from below.

The rock did not fight or make decisions. Yet the terrain imposed both an advantage and a cost: from above, the surroundings were visible, but living in a high, hard-to-reach place was not the same as establishing a settlement in a more open area. The remains of Ayerbe Castle, rising on a mountain near the Church of San Miguel, still preserve this relationship between elevation, surveillance and landscape.

In 1083, Sancho Ramírez conquered Ayerbe and ordered the settlement to be repopulated. The date makes the fortress and settlement more than a remote possibility: they become part of documented political history. Did this mean the town was fixed on the hill forever? No. Between 1118 and 1122, Alfonso I the Battler established a borough on a plateau farther south.

The plateau opened another door

The shift in the centre of gravity towards flatter ground changes the scene. It is no longer just a defensive position rising above the Hoya, but a borough established in a different location. The sources record the creation of this settlement, but offer no single explanation for why that site was chosen. Geography allows for a cautious interpretation: the plateau offered a setting different from the hill, and the town may have developed a different form of settlement there.

The difference between the two places is easier to understand if you picture the land’s profile: first, the climb towards the castle; then, the higher, gentler surface to the south. This is not a descent from mountain to plain, but a shift between two positions in the terrain. Erosion had formed a Hoya of low-lying ground and small elevations; communities organised their lives across this patchwork.

The castle’s history continued to shift between powers. From 1099, it belonged to the monks of Montearagón through a donation from Pedro I; in 1267, Jaime I recovered it when he established the Barony of Ayerbe for his son Pedro. It later changed hands, and in 1396, when it belonged to Pedro Jordán de Urriés, it was besieged by troops of the Count of Foix during an attempt to invade the Kingdom of Aragon. The position that had served to command the landscape thus became part of conflicts that extended beyond the town’s horizon.

The mountain does not explain who won or why each lordship was contested. It does help us understand what made the place valuable: the castle occupied a commanding position, while the borough and town developed in terrain that offered alternative settlement sites. The land did not dictate politics; it provided a setting and specific strategic positions.

The layers still tell a story, but on a different scale

Today, San Miguel hill and the castle ruins still command the Hoya. If you climb up there, the view brings together in a single sweep the heights, open ground and isolated hills that define Ayerbe’s landscape. The castle is not separate from its surroundings: its location is part of what allows us to read the landscape.

The ground also behaves in particular ways today. The geotechnical study identifies locally predominant expansive clays and a moderate-to-high risk of expansion; it also describes areas with potential ground movements, such as landslides or rockfalls. Expansive clay can change volume as its moisture content varies, rather like a sponge that swells when wet and shrinks as it dries. These are characteristics of the municipal terrain, not evidence that a specific event damaged the castle or determined its medieval location.

In the same study, the formations are generally described as having low permeability, although they may contain more permeable aquifers at depth. This is a reminder that the visible landscape and what lies beneath it operate on different scales. The sedimentary layers record ancient environments; erosion shaped their landforms; and communities made use of the difference between a defensive height and a plateau farther south.

La Torre del Reloj de Ayerbe, construida entre 1798 y 1799, representa un hito del paisaje urbano posterior a la etapa del castillo.

La Torre del Reloj de Ayerbe, construida entre 1798 y 1799, representa un hito del paisaje urbano posterior a la etapa del castillo.

Foto: McBodes, CC BY 3.0 — commons.wikimedia.org

Ayerbe did not have to choose between the hill and the Hoya: it made both part of its history. The castle still marks the height from which the territory was commanded, while the borough on the plateau reminds us that a community’s life can also shift from one place to another. When you look at the profile of San Miguel again, you will see more than a ruin on a mountain: you will see the terrain that gave Ayerbe its two settings.

Ground types in Ayerbe

Characteristic soils in the area, ordered by relevance.

  • Areniscas, Conglomerados y Flysch
    Warning

    Sandstones, Conglomerates and Flysch

    Sedimentary rocks formed by the cementation of fragments of other pre-existing rocks. They include sandstones (cemented sand), conglomerates (cemented gravels) and the rhythmic alternation of sandston

    View details
  • Arenas finas y limos
    Hazard

    Fine sands and silts

    Fine to very fine granular soils with medium to loose compacity. Typical of floodplains and coastlines. Although they can support light buildings, they are treacherous soils linked to water processes:

    View details
  • Gravas y Arenas compactas
    Neutral

    Compact gravels and sands

    High-compacity granular deposits, typically associated with old fluvial terraces (Ebro, Duero, Tajo, Guadalquivir rivers) and Pleistocene glacis. They have no cohesion (they are not clays) but their a

    View details
Geotechnical study

Do you need a geotechnical study in Ayerbe?

Request a no-obligation quote. We’ll advise you on the type of study you need.

  • Studies signed by a licensed geologist
  • Compliant with the CTE and Eurocode 7
  • Coverage throughout Spain
4,9 / 5

Más de 1000 estudios realizados

Request a free quote

Just one more little step...

We can contact you via WhatsApp, phone, or email, whichever you prefer.