Archaeological evidence suggests that the area around Arraiolos has been inhabited since at least the late Neolithic or Chalcolithic periods, indicating significant human occupation as early as the 4th millennium BCE.
Others trace its origins to Sabine, Tusculan, and Alban settlers who are believed to have arrived in the area before the Sertorian Wars, led by a figure named Rayeo.
[8] During the Islamic period, Arabic sources offer few details on the region, aside from the growing importance of Évora from the 10th century onward.
This land largely corresponded to today's municipality, with the exception of Vimieiro, which would be granted a charter (foral) in 1257 by bishop Martinho of Évora.
On December 26, 1305, a contract for the castle's construction was formalized between the king and representatives of the town council, João Anes and Martim Fernandes.
[8] Álvaro Pires de Castro's rule over Arraiolos was marked by conflict with the townspeople, primarily due to his lodging rights, which required locals to house and feed his large entourage whenever he visited.
In response, a formal agreement was established that limited Álvaro Pires de Castro's demands: he could no longer requisition residents' homes or take their belongings, such as food and household items, without consent.
It was part of a reform initiated in 1496 to modernize and correct issues in older medieval charters granted to Portuguese towns and cities.
This reform aimed to curb abuses by local lords, who had imposed unauthorized taxes and exploited the population, especially in towns held by noble patrons, as was the case with Arraiolos under Álvaro Pires de Castro.
By issuing a revised foral, the crown sought to reaffirm its authority, protect the rights and privileges of towns, and regulate relationships within the community to ensure fair governance.
After the expulsion of non-Catholics under King Manuel I in the early 16th century, many Muslim artisans are assumed to have migrated to the south of Portugal, particularly to the Alentejo region.
These skilled weavers would have helped introduce and preserve carpet-making techniques, which merged with local traditions to create the distinctive Arraiolos style.
However, by the 19th century, the production of Arraiolos rugs began to decline as industrialization and the proliferation of machine-made textiles increasingly displaced the traditional craft.