Straddled on the ridge of Mount Titano is the city of San Marino of the Republic of San Marino, the history of which dates from the early 4th century. According to the legend related to the Mount and its precincts, a small monastery existed on top of the Mount during the 8th century. The mountainous landscape provides excellent views of its surroundings, and its isolated location ensured the needed seclusion for San Marino to survive as a Republic over the past several centuries.