Almeirim () is a city and a municipality in Santarém District, Portugal. The population in 2011 was 23,376, in an area of 222.12 km². The city proper had a population of 10,520 in 2001. History There are vestiges of mid-Paleolithic to Mesolithic period along the territory, including traces from Neolithic, Calcolithic and Bronze Age remnants. The Iron Age also marked this region, with archaeological excavations unearthing settlements and artefacts. Roman legions of Décimo Junius Brutus occupied the territory, following the Tagus upstream and disembarking in Santarém, where they left their marks. These, along with other groups, occupied arable lands, beginning in the first century A.D. This included the development of agriculture (particularly wheat and olive orchards) and raising of cattle, supporting the establishment of Almeirim along the margins of the Tagus. References to this municipality, began appearing in the 14th century. With rich lands, the territory supported hunting, extending to Santarém, and proximities of the Tagus and Lisbon. This easy access, made Almeirim a preferred place for the Kings of the second Dynasty, and a winter place frequented by members of Corte, becoming known as the Sintra of Winter. Almeirim, therefore, became an ideal place for relaxation, palace intrigue and romantic encounters in the royal gardens, mixed with resolutions of important negotiations. King John I, between 1411 and 1423, ordered the construction of castle and first residences that contributed to the establishment of the town, with the work to the Al-meirim, that included landscaping, drainage and earthen-works. In 1483, Almeirim was elevated to the status of municipality, wherein he bestowed a concession on its residents. As a consequence, in 1490, its first almoxarife (sheriff) Álvaro Pires Borges was assigned by King D. John II from the royal guard. In 1500, the Church of São João Baptista was constructed. The palace was expanded and improved by Manuel I of Portugal who was in Almeirim several times: in 1510, part of 1513, Christmas of 1514 and all the period between October 1515 and May 1516. John III of Portugal followed his example, and spent similar time in Almeirim. He ordered the construction of a royal palace near the Ribeira de Muge (Muja or Mugem), that became known as Paço da Ribeira de Muge and later, the Paço dos Negros', then later the Convent of Nossa Senhora da Serra. King Sebastian, who frequently visited Almeirim, created a dynastic succession crisis with his disappearance