history of San Marino, a survey of important events and people in the history of San Marino from ancient times to the present.
The Republic of San Marino traces its origin to the early 4th century ce when, according to tradition, St. Marinus and a group of Christians settled there to escape persecution. The Castellum Sancta Marini is mentioned in the Liber Pontificalis (“The Book of the Pontiffs”) in 755; the oldest document in the republican archives mentions the abbot of San Marino in 885. By the 12th century San Marino had developed into a commune ruled by its own statutes and consuls. The commune was able to remain independent despite encroachments by neighbouring bishops and lords, largely because of its isolation and its mountain fortresses. Against the attacks of the Malatesta family, who ruled the nearby seaport of Rimini, San Marino enjoyed the protection of the rival family of Montefeltro, who ruled Urbino. By the middle of the 15th century, it was a republic ruled by a Grand Council—60 men taken from the Arengo, or Assembly of Families. Warding off serious attacks in the 16th century (including an occupation by Cesare Borgia in 1503), San Marino survived the Renaissance as a relic of the self-governing Italian city-states. Rule by an oligarchy and attempts to annex it to the Papal States in the 18th century marked the decline of the republic.
When Napoleon Bonaparte invaded Italy, he respected the independence of the republic and even offered to extend its territory (1797). The Congress of Vienna (1814–15), at the end of the Napoleonic Wars, also recognized San Marino’s independent status. During the 19th-century movement for Italian unification, San Marino offered asylum to revolutionaries, among them Giuseppe Garibaldi. After Italy became a national state, a series of treaties (the first in 1862) confirmed San Marino’s independence. In World War II (1939–45), San Marino remained neutral, but it was the target of a British bombing raid in 1944 and was briefly occupied by both the Germans and the Allies later that year. In 2002 San Marino adopted the euro as its national currency.