The first tower or Guaita, out of the three castles that guard San Marino's hill-top presence, was once a former watch post and shelter of the early inhabitants of Mount Titano. The central part of the fortress dates back to the 10th-11th centuries making it one of the most ancient fortifications in Italy. After having been the seat of various military institutions, some of its cells were used as a state prison from the second half of the 18th century right up to 1970.