Arise of the Castelo dos Templários and Convento de Cristo
After the conquest of the region from the Moors in the Portuguese Reconquista, the land was granted in 1159 as a fief to the Order of the Knights Templar. Its Grand Master in Portugal, and Tomar's somewhat mythical founder, Gualdim Pais, laid in 1160 the first stone of the Castle and Monastery that would become the headquarters of the Order in Portugal.
The feudal contract was granted in 1162 by the Grand Master to the people. The Templars ruled from Tomar a vast region of central Portugal which they pledged to defend from Moorish attacks and raids. Like many lords of the unpopulated former frontier region of central Portugal, the villagers were given relatively liberal conditions in comparison with those of the northern regions of Portugal, in order to attract new immigrants. They were not allowed the title of Knight which was reserved to the monks. Women were also admitted to the Order, although they didn't fight.
In 1190 a Moroccan caliph and his army attacked Tomar. However the crusader Knights and their leader kept them at bay. A plaque commemorates this bloody battle at the Porta do Sangue at the Castelo Templário (Castle of Tomar).
Castle and Convent of the Knights Templar of Tomar (transferred in 1344 to the Knights of the Order of Christ)
In 1314, under pressure from the Pope Clement V, who wanted the Templars banned throughout Europe, King Dinis negotiated instead to transfer the possessions and personnel of the Order in Portugal to a newly created Order of Christ. This Order in 1319 moved south to Castro Marim, but in 1356 it returned to Tomar. In the 15th century the position of (cleric) Grand Master of the Order was henceforth nominated by the Pope, and the (lay) Master or Governor by the King, instead of being elected by the monks.
Henry the Navigator was made the Governor of the Order. The cross of the Order of Christ that was painted in the sails of the caravels that crossed the seas, and the Catholic missions in the new lands were under the authority of the Tomar clerics until 1514. Henry, enriched by his overseas enterprises, was the first ruler to ameliorate the buildings of the Convento de Cristo since its construction. He also ordered dams to be built to control the river Nabão and swamps to be drained. This allowed the burgeoning town to attract more settlers. Henry ordered the new streets to be designed in a rational, geometrical fashion, as they can still be seen today.
(source: Wikipedia)