The region around Leiria has been inhabited for a long time, although its early history is very
obscure. The Turduli, an indigenous people from Iberia, established a settlement near (around 7 km) present-day Leiria. This
settlement was later occupied by the Romans, who expanded it under the name Collippo. The stones of the ancient Roman
town were used in the Middle Ages to build much of Leiria.
Little is known about the area in Visigoth times, but during the period of Arab domination
Leiria was already a village with a garrison. Moorish Leiria was captured by the first King of Portugal, Afonso Henriques
in 1135, during the so-called Reconquista. The settlement was shortly retaken by the Moors in 1137 and then in 1140. In 1142
Afonso Henriques reconquered Leiria, dating from this year its first foral (compilation of feudal rights) to stimulate
the colonisation of the area. Leiria was still conquered by the Moors in 1190 and 1195, only to be retaken again by King Sancho
I.
Both Afonso Henriques and Sancho I rebuilt the walls and the castle of the village to avoid new Moorish incursions. Most of the population lived inside the protective city walls, but already
in the 12th century part of the population lived outside the walls. The oldest church of Leiria, the Church of Saint Peter
(Igreja de São Pedro), built in romanesque style in the last quarter of the 12th century, served the parish located
outside the walls.
During the Middle Ages the importance of the village increased,
and it was the setting of several cortes (feudal parliaments). The first of the cortes held in Leiria were in
1245, under King Afonso II. In the early 14th century, King Dinis I restored the keep tower of the citadel of the castle,
as can be seen in an inscription in the tower. He also built a royal residence in Leiria (now lost), and lived for long periods
in the town, which he donated as feud to his wife, Isabel. The King also ordered the plantation of the famous Pine Forest
of Leiria (Pinhal de Leiria) near the coast. Later, the wood from this forest would be used to build the ships used
in the Portuguese Navigations of the 15th and 16th centuries.
In the late 15th century, King John I built a royal palace within
the walls of the castle of Leiria. This palace, with elegant gothic galleries that offered wonderful views of the town and
surrounding landscape, was totally in ruins but was partially rebuilt in the 20th century. John I also sponsored the rebuilding
in late gothic style of the old Church of Our Lady of the Rock (Igreja de Nossa Senhora da Pena), located inside the
castle.
Towards the end of the 15th century the town continued to grow,
occupying the area from the castle hill down to the river Lis. In Leiria was printed the first book in Portugal. King Manuel
I gave it a new foral in 1510, and in 1545 it was elevated to the category of city and became seat of a Diocesis. The
Cathedral of Leiria was built in the second half of the 16th century in a mix of late gothic (manueline) and late renaissance
(mannerist) styles.
Compared to the Middle Ages, the subsequent history of Leiria
is of relative decadence. In the 20th century, however, its strategic position in the Portuguese territory favoured the development
of a diversified industry.