The area was reconquered by Christians in 1136, and the town was donated in 1178 by the first king of Portugal, Afonso Henriques, to his third daughter, Princess Theresa.
The princess granted it a letter of feudal rights (foral) in 1180, to promote the settlement and development of the village.
The third Count of Ourém was the celebrated Nuno Álvares Pereira, the knight who led the Portuguese army to victory against the Castilians in the Battle of Aljubarrota in 1385.
To accommodate his court, Count Afonso remodelled the old-fashioned castle and built a palace inside it following the trends in 15th-century Italian military architecture.
The legend of the name of the village and Oureana is retold by Friar Bernardino de Brito in his Chronicle of the Order of Cister (1602): In a surprise attack on the St John's Day in 1158, a Christian knight, Gonçalo Hermigues and his companions kidnapped a Moorish princess with the famous Arab name of Fatima.
The knight took Fatima to a small village of the recently created Kingdom of Portugal, in the Serra de Aire hills.