Alcalà de Xivert is a town belonging to the region of Bajo Maestrazgo in Castellón, a province of the Community of Valencia, Spain.

The history of Alcalà de Xivert is rich and diverse, thanks to the many peoples and cultures which have inhabited this land in the eastern Iberian Peninsula. The significant number of archaeological discoveries distributed throughout the municipality confirm the Prehistoric presence of humans in what is modernday Alcalà de Xivert. Evidence of Epipaleolithic stone industry dating from 9000 B.C. has been found in the Cova dels Diablets, along with ceramics from the middle Neolithic and lithic industry dating from the late Neolithic. Archaeological remains have also been found in the form of ceramic remains from the Neolithic in the Cova de la Torrera; furthermore, excavations are now under way in various enclaves, such as in the vicinity of the Santa Llúcia hermitage, adding to the local archaeological heritage and demonstrating the significant level of human occupation in these lands from time immemorial.
We find many vestiges from the dawn of history throughout Alcalà. What stands out foremost is the presence of material brought by the merchant peoples of the eastern Mediterranean; for example, an Egyptian scarab discovered in the Solivella necropolis, and Phoenician and Greek ceramics discovered at various sites.
This demonstrates the fluid, regular contact and interrelation that existed among the inhabitants of the entire Mediterranean basin during the Bronze and Iron Ages; this contact would give rise to the fundamental nucleus that would usher in the appearance of the Iberian culture on the Mediterranean coast, fruit of the relationship between the native people and the Phoenician and Greek merchants and colonizers, as confirmed by these material remains in the case of Alcalà.
Precisely, archaeological remains from the Iberian period and the subsequent Romanization abound throughout the area: there are towns such as El Palau and El Tossalet; tombstones with inscriptions, ceramic remains and metals in Corral de Royo, Pulpis, Irta and Xivert; Roman coins in Regalfarí, Alcalà and Xivert; and indications of burials in and around Capicorb, Palaba and Alcossebre, all of which demonstrate a dense network of settlements from that time. Of special significance is the site of the necropolis at La Solivella, quickly excavated in 1961 upon its fortuitous discovery in a field which was being plowed. It is, in fact, one of the oldest Iberian necropolises in the entire Iberian cultural sphere: it dates from between the sixth and fifth centuries B.C. Archaeological remains, including funerary urns and diverse grave goods (arms, brooches, bracelets, etc.) are currently housed in the Museum of Prehistory of Valencia.
In particular, the process of Romanization is confirmed mainly by the presence of tombstones in Corral de Royo, Corral Blanco and Almedíxer, as well as by the aforementioned presence of coins at distinct points within the municipal area, which attests to the transit of people and merchandise along the coast, taking advantage of the proximity of the Via Augusta as it made its way through Cabanes and Les Coves.
Especially noteworthy is the spectacular Xivert castle, which sits atop the mountains from which it takes its name, and which since the Middle Ages has dominated the strategic pass between Valencia and Barcelona. The excavations carried out over the last decades have confirmed the antiquity of the settlement in the Xivert area, but its true splendor and significance are found in the construction of the Arab fortress and medina in Islamic times, which began in the tenth and eleventh centuries, and which is one of the best preserved Islamic castles and villages from the ancient Kingdom of Valencia, with a magnificent inscription in Arabic on the outer wall of the fortress.
In 1234, following the Christian conquest of the territory at the start of the 13th century, the castle passed into the hands of the Knights Templar, who administered it in the name of the Crown of Aragon following the peaceful surrender of the Islamic population of Xivert. Thus, the Templars proceeded to remodel and expand the fortress, occupying it while the Islamic civilian population occupied the town at the base of the fortress.
Precisely in these decades of conquest and repopulation of the territory, the administration of Xivert is formalized with the concession of a town charter to the Muslim population of Xivert in 1234, while another charter is granted to the new Christian settlements established on the plain of Alcalá (1251), in Alcossebre (1261) and in the already depopulated Almedíxer and Castellnou (1261). Alcalá would soon stand out and lead the 'encomienda'. After the dissolution of the Knights Templar, the new Order of Montesa assumed control of the encomienda in the fourteenth century.

The modern era was witness to a series of significant attacks that devastated the area of Alcalà, attacks suffered by the entire population, both Christian and Muslim: the Mudejar town of Xivert was sacked and burned during the 'Revolt of the Brotherhoods' of Valencia by Estellés in 1521, and was later rebuilt; in 1547 an attack by Berber pirates instigated by the Ottoman Empire was repelled by the population of Alcalà in the very streets of the town after the pirates tried to sack the town (for the town's people, the memory of this episode is still kept alive, commemorated with an inscription in stone in the place of the events). And, in 1586, another pirate attack took place on the watchtower at Capicorb.
At the end of the 16th century, the Moorish population of Xivert was composed of several hundred inhabitants; they had rebuilt and repopulated the town after it had been looted decades earlier. Nonetheless, this population was forced into exile, along with the rest of the 'moriscos' in Spain, following the signing of the expulsion decree by Felipe III in 1609. After this expulsion, an attempt was made to repopulate the town of Xivert with Christians, but this failed; Xivert was therefore added, along with Santa Magdalena de Pulpis, to Alcalá in 1632. Furthermore, Alcossebre, which had obtained its second town charter in 1330 following the failure of the initial settlement, was incorporated into Alcalá in 1663. By the end of the 17th century, the castle and town of Xivert were already in ruins.
After the destruction and debacle that led to the War of Succession in the early 18th century, the population of Alcalà began expanding, mainly around the town center of Alcalà. Nevertheless, in the 19th century, Santa Magdalena de Pulpis was segregated and, from there on, would constitute a different municipality; the town's population saw significant growth, going from 800 homes (some 3,200 inhabitants) in the time of Cavanilles, at the end of the 18th century, to more than 6,000 inhabitants by 1900.
In the first half of the 20th century, the town fell on hard times: in the course of the disastrous Civil War, Alcalà found itself on the front lines of the war when troops loyal to Franco advanced towards Valencia following the Battle of the Ebro. Thereafter, the local economy was plunged into a steep decline, worsened in part by the decline of traditional rain-fed agriculture. This situation would begin to remedy itself in the 60s and 70s as irrigation practices caught on, and, above all, thanks to the great boom in tourism during those decades, which radically transformed the entire coast and promoted the significant growth and urban development experienced in the center of Alcossebre.