Prehistory. The paintings found in the caves in the pine forest (el pinar) show that people were already living in this area in the Stone Age. Remnants from the Bronze Age, the Iron Age and from the times of the Celtiberians have been found here as well.
Roman period.The tombstones used during the construction the cathedral –they can be found at the base of the tower- are indications of the Roman presence. Other remnants are the bridge over the river Guadalaviar, a few kilometers west of Albarracín and the aqueduct running from Albarracín to Cella, covering a distance of about 25 kilometres.
Moorish period.In the 10th century mention is made of an important castle with military purposes. In the first reference made to the castle it is called Castillo de Santa María de Oriente. It is said that Meurán ben Razín, military commander of Abderramán III, lived in the castle. The “Alcazaba”, the “torre del Andador”, the “torre del Agua” and the “torre de la Muela” stem from this period. In Arabic texts from before the 11th century the settlement at the location of the current city of Albarracín is referred to as Santa María de Oriente , named after a Visigothic church (on the site of the current Santa María church). Initially, Albarracín will have existed of only a church surrounded by a small Christian community. In the 11th and 12th century, Albarracín is already a city (or medina, as it is called in Arabic) with a landlord residing in a fortress. Albarracín was the capital of the realm “La Sahla” of Ibn Razín´s (which subsequently belonged to his descendants Banu Razín). It was considered one of the most important cities of Moorish Spain. During Ibn Razín reign (11th century) a large-scale urban extension took place. It was in this period that the town got enclosed by a new city wall.
Los Azagra (1170-1280) Independent segniory. Albarracín passed on into Christian hands when Muhammad ibn ‘Abd Ajoāh ibn Sano’d ibn Mardāniš (also known at the times by Christians as “el rey Lobo” – King Wolf) from Murcia gave the city to don Pedro Ruiz de Azagra in exchange for services rendered. Thus Albarracín became the capital of an independent Christian state that was originally founded by a Moorish king. Don Pedro made himself felt and, with force, audacity and deftness, succeeded in defending himself against Castilla and Aragón, that wanted to capture Albarracín. It proved not for nothing that he had learnt the trade from his old Lord and inpsirator el rey Lobo and the king of Navarra Sancho VI the Wise.
This segniory existed until 1285 when it was conquered by Pedro III of Aragón. He took the city when the inhabitants were starved to surrender. The Azagra family granted Albarracín certain privileges, leading to the “Comunidad de Albarracín”, a community of villages that still exists. The political independence was strengthened in 1172 when the Albarracín diocese was founded. The diocese fell under the archbishopric of Toledo. Albarracín held its indepence from Castilla and Aragón, both under the Azagra´s and under their successors, the Lara´s and the prince of Aragón, Don Fernando (stepbrother of Pedro IV), who called themselves Vassals of Santa María and Lords of Albarracín noemden. In the 10th century, the neighbourhood at the foot of the castle must already have been defended by a city wall. This wall had only one entrance gate, “la puerta de hierro” (the iron gate).
No remains of this gate, which was situated between la casa de la enseñanza and the current post office, exist. Two roads led to this gate, one in the direction of Molina de Aragón and the rest of the Sierra de Albarracín, the second one towards Zaragoza, Teruel and the fertile plains near the river that belonged to the city. During the city expansion in the 11th century a new city wall was built around the city. This wall formed a powerful supplement to the existing defence (that would be rebuilt and raised in later times). From that moment on the city could only be reached through three main entrance gates and some minor passages. The first main entrance led towards Molina de Aragón and the Sierra de Albarracín. This gate still exists. The second one was “el portal del agua“ (the water gate) that led to the river. This one still exists as well. The third one was the “portal de Teruel”, that, once going down the cuesta de Teruel (slope to/from Teruel) led to Zaragoza, Teruel and the river plains. This gate existed until the 18th century. When you walk down the cuesta de Teruel, at the foot cross the bridge over de Guadalaviar River and continue on the main road you will reach la Casa Grande at the end of the built-up area.
Albarracín, National Monument. Albarracin, National Monument. In 1961 Albarracín was declared national monument. In 1996 Albarracín received “la Medalla de Oro al mérito en las Bellas Artes”, a high award from the Spanish Ministry of Culture. Albarracin has been nominated to become a UNESCO World Heritage Site.
 Fray Antonio de Santa María, en su libro “España Triunfante”, afirma que fue la primera ciudad que tomó el nombre de Santa María, como testimonio de la religiosidad de sus habitantes.
Tanto los Azagra como sus sucesores, los Lara, y el Infante de Aragón don Fernando (hermanastro de Pedro IV) se mantuvieron independientes de Castilla y Aragón, llamándose “Vasallos de Santa María y señores de Albarracín”