Tomar was born out of the donation of the Ceras Castle to the Knights Templar by King Afonso Henriques in 1159. The territory was crossed in the south by the Tomar river, with a fertile valley to the west with very step foothills. It was in one of these foothills that Master D. Gualdim Pais founded, in 1160, the Tomar castle and its village.
The castle was built on a belt of walls surrounding the edifice. Within it, two curtains of walls divided the area into three different spaces. In the southern part of the fortress one could find the villa space - where today the orange grove sits. On the highest part of the foothill, to the north, the Templar military house was set, flanked to the west by the Master's house - the Alcáçova with its tower and to the east the knights' oratorium - the Charola. These two spaces were separated by the vast yard of the castle - today a gardened space.