Urban nucleus district headquarters. City located on a hillside and valley. Medieval city, structured in the 13th and 14th centuries, having consolidated itself in the 15th and 16th centuries. The historic center acquired its current limits only at the end of the 19th century and during the 20th century. Like most Portuguese cities, the defensive function is at the origin of the city and the place of settlement chosen is close to a river course. D. Afonso Henriques decided to build the Castle of Leiria to mark a strategic defensive position at the time of the reconquest.