# History of San Marino

As the only surviving medieval commune in the Italian Peninsula, the history of San Marino is intertwined with the medieval, Renaissance and modern-day history of the Italian peninsula, according to tradition beginning with its foundation in 301 AD.
Like Andorra, Liechtenstein and Monaco, it is a surviving example of the typical medieval microstate of Germany, Italy and the Pyrenees.

## Origins
### Foundation myth

According to legend, San Marino was founded in 301 AD when a Christian stonemason Marinus (lit. from the sea), later venerated as Saint Marinus, emigrated in 297 AD from the Dalmatian island of Rab, when Emperor Diocletian issued a decree calling for the reconstruction of the city walls of Rimini, destroyed by Liburnian pirates. Marinus later became a Deacon and was ordained by Gaudentius, the Bishop of Rimini; shortly after, he was "recognised" and accused by an insane woman of being her estranged husband, whereupon he quickly fled to Monte Titano to build a chapel and monastery and live as a hermit. Later, the State of San Marino would bud from the centre created by this monastery. Living in geographical isolation from the Diocletianic Persecution of Christians at the time, the mountain people were able to live peaceful lives. When this settlement of "refugee" mountain people was eventually discovered, the owner of the land, Felicissima, a sympathetic lady of Rimini, bequeathed it to the small Christian community of mountain dwellers, recommending to them to remain always united. This foundation tale is at the base of San Marino's claim to be the world's oldest surviving republic.
According to William Miller, these accounts of the origin of San Marino "are a mixture of fables and miracles, but perhaps contain some grains of fact".

### Documents

Evidence of the existence of a community on Mount Titano dates back to the Middle Ages. That evidence comes from a monk named Eugippio, who reports in several documents going back to 511 that another monk lived here.
The first attested government structure was composed of a self-governed assembly known as the Arengo, which consisted of the heads of each family (as in the original Roman Senate, the Patres). In 1243, the positions of Captains Regent (Capitani Reggenti) 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.

## Early Middle Ages and Renaissance

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.
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.
Having faced many potential threats, a treaty of protection was signed in 1602 with Pope Clement VIII, which came into force in 1631.

## Modern Period
### Statutes of 1600

The basis of San Marino's government is the multi-document Constitution of San Marino, the first components of which were promulgated and became effective on 1 September 1600. Whether these documents amount to a written constitution depends upon how one defines the term. The political scientist Jorri Duursma claims that "San Marino does not have an official constitution as such. The first legal documents which mentioned San Marino's institutional organs were the Statutes of 1600."

### Alberonian occupation

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 Sammarinese 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, three and a half 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.

### Napoleonic Wars

After Napoleon's campaign of Italy, San Marino found itself on the border between the Kingdom of Italy and long-time ally the Papal States. On 5 February 1797, when, with the arrival of a letter from General Louis Alexandre Berthier addressed to the Regents, it was required to arrest and consign the Bishop of Rimini, Vincenzo Ferretti, accused of instigating crimes against the French Empire, who fled with all his possessions to San Marino and refusal would result in the immediate intervention of French troops.
The Government of San Marino replied that it would do everything possible to fulfill the request, even though, in reality, the bishop was able to flee across the border.
A solution was found by one of the Regents, Antonio Onofri, who inspired in Napoleon a friendship and respect toward the sovereign state. Napoleon was won to the commonality in cause with the ideals of liberty and humanity extolled in San Marino's humble founding and wrote in recognition of its cultural value in a letter to Gaspard Monge, scientist and commissary of the French Government for the Sciences and the Arts who was at the time stationed in Italy; further promising to guarantee and protect the independence of the Republic even so far as offering to extend its territory according to its needs. While grateful for the former, the offer of territorial expansion was politely declined by San Marino.
Napoleon issued orders that exempted San Marino's citizens from any type of taxation and gave them 1,000 quintals (over 2,200 lb or 1,000 kg) of wheat as well as four cannons; although for unknown reasons, the cannons were ultimately never brought into San Marino.
Napoleon's treatment of San Marino may be better understood in light of the ongoing French Revolution (1789–1799) where France was undergoing drastic political reform. Being a surviving example of republican institution, not only under threat of Papal interference but also not hostile to the French Republic (as Venice Genoea, or Switzerland) may have gained enough sympathy to secure independence. The state was recognized by Napoleon by the Treaty of Tolentino, in 1797. Onofri will keep negotiating favourable terms with the Northern Italian "Sister Republics" and later Kingdom of Italy.

## 19th century

The Congress of Vienna ratified San Marino's independence in 1815.
In 1825 and 1853, new attempts to submit it to the Papal States failed.
The sympathy of Republicanist advocates inside the Italian "Risorgimento" movement, the hospitality and asylum granted to unionist supporters and a general disinterest, played again in favour of Sammarinese independence. The most notorious event was covering Giuseppe Garibaldi's retreat with 250 followers towards Venice after the fall of the 1849 Roman Republic.
Although faced with many hardships (with his wife Anita who was carrying their fifth child dying near Comacchio before they could reach the refuge), the hospitality received by Giuseppe in San Marino would later prove to be a shaping influence on Giuseppe's diplomatic manner, presaging the themes and similar language used in his political correspondences such as his letter to Joseph Cowen. Garibaldi promised to honor San Marino's desire not to be included in the Italian unification, and pressured king Victor Emmanuel II to call off a planned annexation of San Marino in 1860.
In the spring of 1861, shortly before the beginning of the American Civil War, the government of San Marino wrote a letter to United States President Abraham Lincoln in "perfect Italian on one side, and imperfect but clear English on the other"; this proposing an "alliance" between the two democratic nations and offering the President honorary San Marino citizenship. Lincoln accepted the offer, writing in reply with his Secretary of State, William H. Seward that San Marino proved that "government founded on republican principles is capable of being so administered as to be secure and enduring." Presaging a theme he would bring to the fore, using similar language, in his Gettysburg Address in 1863, Lincoln wrote: "You have kindly adverted to the trial through which this Republic is now passing. It is one of deep import. It involves the question whether a Representative republic, extended and aggrandized so much as to be safe against foreign enemies can save itself from the dangers of domestic faction. I have faith in a good result...."
After the unification of the Kingdom of Italy a treaty in 1862 confirmed San Marino's independence, later revised in 1872.
Towards the end of the 19th century, San Marino experienced economic depression: a large increase in the birth rate coupled with a widening of the gap between agricultural and industrial development led people to seek their fortunes in more industrialised countries. The Sammarinese first sought seasonal employment in Tuscany, Rome, Genoa and Trieste, but in the latter half of the century whole families were uprooted, with the first permanent migrations to the Americas (United States, Argentina and Uruguay) and to Greece, Germany and Austria. This phenomenon lasted up to the 1970s, with a pause during the First World War and an increase during the Fascist period in Italy. Even today there are still large concentrations of San Marino citizens residing in foreign countries, above all, in the United States, in France and in Argentina. There are more than 15,000 San Marino citizens spread throughout the world.

## 20th century

An important turning-point in the political and social life of the country took place on March 25, 1906, when the Arengo met; out of 1,477 heads of family, 805 were present. Each head of family received a ballot which contained two questions: the first asking if the Government of San Marino should be headed by a Principal and Sovereign Council, and the second, if the number of members of the Council should be proportionate between the city population and the rural population. This was the first move towards a referendum and true democracy in San Marino. In the past, similar attempts were made by people such as Pietro Franciosi, but without results. In the same year a second referendum took place on May 5 dealing with the first electoral laws and on June 10 the first political elections in San Marino's history resulted in a victory of the exponents of democracy.

### World War I

While Italy declared war on Austria-Hungary on 23 May 1915, San Marino remained neutral. Italy, suspecting that San Marino could harbour Austrian spies who could be given access to its new radiotelegraph station, tried to forcefully establish a detachment of Carabinieri on its territory and then suspended any telephone connections with the Republic when it did not comply.
Two groups of 10 volunteers each did join Italian forces in the fighting on the Italian front, the first as combatants and the second as a medical corps operating a Red Cross field hospital. It was the presence of this hospital that later caused Austrian authorities to suspend diplomatic relations with San Marino.
Although propaganda articles appeared in The New York Times as early as 4 June 1915 claiming that San Marino declared war on Austria-Hungary, the republic never entered the war. The Riminese earthquake of 16 August 1916 affected San Marino; several houses in Serravalle collapsed. Two houses were damaged in the earlier earthquake on 17 May 1916.

### Inter-war period

San Marino in the 1920s, still a largely agrarian society, experienced political turmoil influenced by the events in Fascist Italy, culminating in June 1921 in the murder in Serravalle of Italian doctor and Fascist sympathiser Carlo Bosi by local leftists, which led to condemnation by the surrounding Italian population and threats of retaliation by Italian squadristi. The government decided to ask Italy for help in the form of a detachment of 30 Carabinieri. As in Italy, fascism, under the Sammarinese Fascist Party led by Giuliano Gozi, eventually took over government of San Marino, causing the Socialist newspaper, Nuovo Titano, to cease publication.
The 1930s was an era of public works and reinvention of the Republic's economy, with the construction of the San Marino-Rimini railway that connected it to the Italian railway network and modernization of the country's infrastructures that paved the way to its present status as a major tourist destination.

### World War II

San Marino was mostly uninvolved in the Second World War. In September 1940, press reports claimed that it had to have declared war on the United Kingdom in support of Italy; however, this was later denied by the Sammarinese government. On 26 June 1944, San Marino was bombed by four waves of Allied bombers under the belief that San Marino had been occupied by German forces and was being used to amass stores and ammunition. The Sammarinese government declared on the same day that no military installations or equipment were located on its territory, and that no belligerent forces had been allowed to enter.
San Marino's hope to escape further involvement was shattered on 27 July 1944 when Major Gunther, commander of the German forces in Forlì, delivered a letter from German headquarters in Ferrara to San Marino's government declaring that the country's sovereignty could not be respected if, in view of military requirements, the necessity of transit of troops and vehicles arose. The communiqué, however, underlined that wherever possible occupation would be avoided. Such fears were confirmed when on 30 July a German medical corps colonel presented himself with an order for the requisition of two public buildings for the establishment of a military hospital. On the following day, 31 July 1944, in view of the likely invasion by German forces, the state sent three letters of protest: one to Joachim von Ribbentrop, German Foreign Minister, one to Adolf Hitler and one to Benito Mussolini, the latter delivered by a delegation to Serafino Mazzolini, a high-ranking diplomat in the Italian Ministry of Foreign Affairs. Demanding to meet Mussolini with the intention to ask that its neutrality be respected, the following day Mazzolini took them to see Mussolini, who promised to contact the German authorities and intervene in favour of San Marino's request.
San Marino was a refuge for over 100000 civilians who sought safety on the passing of Allied forces over the Gothic Line during the Battle of Rimini, an enormous effort of relief by the inhabitants of a country that at that time counted only 15,000 people. Despite all this, German forces invaded San Marino on 13 September 1944. The Germans and Allies clashed on San Marino's soil from 17 September to 20 September at the Battle of San Marino; Allied troops occupied San Marino after that, but stayed only for two months before leaving.

### Cold War and economic boom

After the war, a social-communist government was installed in San Marino, composed by the Sammarinese Communist Party and the Sammarinese Socialist Party. This is considered one of the first times anywhere in the world that a communist government was democratically elected into power. The coalition lasted from 1945 to 1957, when the Rovereta affair occurred.
1960 saw the enlargement of universal suffrage to women.
Having joined the Council of Europe as a full member in 1988, San Marino held the rotating chair of the organisation during the first half of 1990.
Following the fall of the Soviet bloc, the Sammarinese Communist Party peacefully dissolved in 1990 and restructured as the Sammarinese Democratic Progressive Party replacing the former hammer-and-sickle logo (a communist motif representing the rights of workers) with the image of a drawing of a dove by Pablo Picasso.
San Marino became a member of the United Nations in 1992.

## 21st century to current days

In 2002 San Marino signed a treaty with the OECD, agreeing to greater transparency in banking and taxation matters to help combat tax evasion.
The SARS-CoV-2 virus, a cause of the COVID-19 pandemic, was confirmed to have reached San Marino in February 2020. As of June 2020, San Marino had the highest death rate per capita of any country, due to the effects of the COVID-19 pandemic. In April 2021, the nation received headlines for using the Russian Sputnik V COVID-19 vaccine rather than vaccines approved by the EU following a slow rollout for the latter vaccines. As of 11 May 2023, with 21,083 confirmed cases out of a population of 33,600 (as of 2020), it was the country with the fourth-highest percentage of confirmed cases per capita at 71.13% – 7 confirmed case per 10 inhabitants. Also, with 90 confirmed deaths, the country has one of the highest rate of confirmed deaths per capita at 0.268% of the total population – 1 death per 373 inhabitants. The crude fatality rate is 2.63%. It was once declared "Covid-free" on 26 June 2020, although on 9 July it had another case, and while this had recovered by the end of the month, the epidemics has returned later and most of recorded covid-assigned fatalities had happened after that.
At the 2020 Summer Olympics, San Marino became the smallest country to earn a medal, as Alessandra Perilli and Gian Marco Berti won silver in the mixed trap shooting event.
On 7 March 2022, during the Russian invasion of Ukraine, the Kremlin released a list of countries, via Twitter, who it considered "unfriendly" to Russia. For joining international condemn and sanctions, an act considered a total reversal of past friendly ties with Russia (culminated with the visit of Sergei Lavrov) San Marino was included in the list, alongside other countries such as the United States of America and countries in the European Union.
On 1 April 2022, 58-year-old Paolo Rondelli was elected as one of the two captains regent, its heads of state. He had previously been the Ambassador to the United States and is the world's first openly gay head of state.