were established to be the joint heads of state. The state's earliest statutes date back to 1263. The Holy See confirmed the independence of San Marino in 1631. During the feudal era In quick succession, the lords of Montefeltro, the Malatesta of Rimini, and the lords of Urbino attempted to conquer the little town, but without success. In 1320 the community of Chiesanuova chose to join the country. The land area of San Marino consisted only of Mount Titano until 1463, at which time the republic entered into an alliance against Sigismondo Pandolfo Malatesta, duke of Rimini, who was later defeated. As a result, Pope Pius II gave San Marino some castles and the towns of Fiorentino, Montegiardino and Serravalle. Later that year, the town of Faetano joined the republic on its own accord. Since then, the size of San Marino has remained unchanged. San Marino has been occupied by foreign militaries three times in its history, each for only a short period of time. Two of these periods were in the feudal era. In 1503, Cesare Borgia occupied the Republic until the death of his father some months later. On 4 June 1543 Fabiano di Monte San Savino, nephew of the later Pope Julius III, attempted to conquer the republic in a plan involving 500 infantry men and some cavalry. The group failed as they got lost in a dense fog, which the Sammarinese attributed to Saint Quirinus, whose feast day it was, and which afterwards has been celebrated annually in the country. San Marino faced many potential threats during the feudal period, so a treaty of protection was signed in 1602 with Pope Clement VIII, which came into force in 1631. On 17 October 1739, Cardinal Giulio Alberoni, Papal Governor of Ravenna, used military force to occupy the country, imposed a new constitution, and endeavored to force the Sammarinesi to submit to the government of the Papal States. He was aiding certain rebels, and acting possibly contrary to the orders of Pope Clement XII. However, civil disobedience occurred, and clandestine notes were written to the Pope to appeal for justice. On 5 February 1740, 3 months after the occupation began, the Pope recognised San Marino's rights, restoring independence. 5 February is the feast day of Saint Agatha, after which she became a patron saint of San Marino. Constitution The basis of San Marino's government is the multi-document Constitution