Inside the Casamatas, S. João de Deus Fort at Almeida, there is a vast complex of 20 domed rooms with unique megalithic ceilings. They were where the population took refuge when the stronghold was being attacked. The first phase was built in the 17th century to quarter troops and is called the “old barracks”. It is also called Casamatas because of its similarity to military architecture. Its many past uses include a food store and a jail during the Civil War (19th century). It has a well and a protected spring. It was adapted to be a museum in 2009.