San Marino was extended with the communities of Faetano, Fiorentino, Montegiardino, and Serravalle, after which the country's borders have remained unchanged. In 1503, Cesare Borgia, the son of Pope Alexander VI, occupied the Republic for six months until his father's successor, Pope Julius II, intervened and restored the country's independence. On 4 June 1543, Fabiano di Monte San Savino, nephew of the later Pope Julius III, attempted to conquer the republic, but his infantry and cavalry failed as they got lost in a dense fog, which the Sammarinese attributed to Saint Quirinus, whose feast day it was. After the Duchy of Urbino was annexed by the Papal States in 1625, San Marino became an enclave within the Papal States, something which led to its seeking the formal protection of the Papal States in 1631, but this never equalled a de facto Papal control of the republic. The country was occupied on 17 October 1739 by the legate (Papal governor) of Ravenna, Cardinal Giulio Alberoni, but independence was restored by Pope Clement XII on 5 February 1740, the feast day of Saint Agatha, after which she became a patron saint of the republic. The advance of Napoleon's army in 1797 presented a brief threat to the independence of San Marino, but the country was saved from losing its liberty by one of its regents, Antonio Onofri, who managed to gain the respect and friendship of Napoleon. Due to Onofri's intervention, Napoleon, in a letter delivered to Gaspard Monge, scientist and commissary of the French Government for Science and Art, promised to guarantee and protect the independence of the Republic, even offering to extend its territory according to its needs. The offer was declined by the regents, fearing future retaliation from other states' revanchism. During the later phase of the Italian unification process in the 19th century, San Marino served as a refuge for many people persecuted because of their support for unification, including Giuseppe Garibaldi and his wife Anita. Garibaldi allowed San Marino to remain independent. San Marino and the Kingdom of Italy signed a Convention of Friendship in 1862. The government of San Marino made United States President Abraham Lincoln an honorary citizen. He wrote in reply, saying that the republic proved that "government founded on republican principles is capable of being so administered as to be secure and enduring." During World War I, when Italy declared war on Austria-Hungary