Its history dates back to the days when it was a pre-historical settlement, a shelter for Lusitanian shepherds, and a Roman fortress known as Cava Juliana or Silia Hermínia. The region of Beira Interior, where the city of Covilhã is located, is rich in historical places. Due to its strategic potential, its mountains were used to build castles for both attack and defence purposes. Covilhã was granted foral in 1186 by king Sancho I of Portugal, who also built the castle walls. The old quarters of the city have narrow cobblestone streets; pedestrians are challenged permanently by the ups and downs of most of the streets in the city.