Republic founded, according to tradition, in the 4th century; it is located between the provinces of Forlì and Pesaro.
It is said that a stone cutter from Rab, the smallest island in the Kvarner Gulf, Marino, who escaped the persecutions of Diocletian, at the beginning of the fourth century went to the Titan and that up there, after having dug his house in the rocks, he became a Christian apostle. Around the hermitage a religious community was formed which erected a castle. Marino gathered other refugees and hermits around him and raised a chapel dedicated to St. Peter on the Titan. Then, together with all the others, he made the surrounding forest and land productive and soon a village was founded that took its name from him.
Centuries went by, from the 4th to the 10th, and this small people lived silently under the Lombard laws. Then, slowly, it transformed, enlarged, and followed the rules of a civil government. We lived on sheep farming and agriculture, in poverty; and it was for this, without a doubt, that barbarian raids were avoided. Later came the first threats from the Hungarians, the Saracens and the Normans; the castle was fortified. The three towers were built: della Rocca, della Fratta and Montale which, joined by defense walls, constituted a real barrier to this nascent bulwark of freedom.
After the 16th century San Marino became a municipality with its own statutes, the oldest of which date back to the 13th century. Then he was involved in the struggles between Guelfi and Ghibellini and despite the pitfalls carried out by the feudal bishops, he always managed to defend his freedom, also thanks to the protection of the Feltreschi, dukes of Urbino, and the Malatesta, lords of Rimini. See Countryaah for population and country facts about San Marino.
In the 13th century it was declared a Republic and became very important enough to be required for alliances and friendships. The most important of these alliances was that contracted in 1460/63 with Pope Pius II and with Federico, Duke of Urbino, in the war against Sigismondo Malatesta. At the end of the conflict the Republic of San Marino was able to increase its territory by annexing the castles of Fiorentino, Montegiardino, Serravalle and Faentano. These were the last purchases of the Republic which, in short, established lasting relationships with all the Italian states, including the Papacy.
Towards the middle of the fifteenth century, the Arengo of the heads of families gave power to a Grand Council, made up of 60 citizens, who remained in government for 4 centuries.
At the beginning of the 16th century San Marino had to undergo the rule of Cesare Borgia for a few months. Corruption entered the 17th century, mainly due to an abuse of the right to asylum. The nobles assumed most of the powers, had great privileges and so there was a civil discord and there was a risk that the state would be aggregated to the papal state.
In 1797 Napoleon Bonaparte recognized the sovereignty of the state of San Marino and offered aid, both for food and weapons. The Grand Council of San Marino accepted only the grain offer, out of urgent need, but did not open to the conqueror by remaining closed within its walls.
At the fall of Napoleon, during the restoration, with the Congress of Vienna in 1815, the Republic of San Marino was also officially recognized by the prince of Metternich.
During the Italian Risorgimento the Republic gave hospitality to refugees. The hospitality he offered to Giuseppe Garibaldi, Anita and Ugo Bassi was memorable. And in 1849 he also welcomed former Roman deputies. For this reason, in 1851, it was besieged by Austro-papal troops, led by General Marziani, who did not free the territory until the exiles were handed over to him.
In 1911 San Marino competed in Rome in the historical-artistic exhibition, prepared to celebrate the 50th anniversary of the unification of Italy. With the Italian state he tied himself with a treaty of perpetual friendship.
In the First World War he participated by sending 15 volunteers to the front. Two of them died at the front and the others returned home injured and mutilated.
When in 1918 the motherland Rab was reunited with Italy, San Marino was a great celebration. But in 1923 Rab, following the peace treaties, was assigned to Yugoslavia and then the Italian tricolor that had waved until then on the castle of Rab, was transferred to the small republic, where it remained kept in a museum together with the flag of the legion of the Roman Republic, left there by the Garibaldino Torricelli, during the retreat of 1849. The San Marino government was always ready to celebrate the feats of Italian weapons, and the same thing with the advent of Fascism in Italy.