Gaius S. answered 12/18/21
Ph.D. in History from UC Berkeley, taught at SFSU, SJSU, UC Berkeley
What I read was that Napoleon thought San Marino was too small to waste time on, and it was not going to provide anything to the economy, so he left it to be its own tiny principality. In the 1860s, the House of Savoy decided to repeat Napoleon's decision. So they left it alone. San Marino was occupied by the Germans in 1944-45 and treated harshly. If the Germans had won WW II, they would have added it to the puppet state of the Fascist Republic of Salo (Mussolini's N Italian rump state). But in late 1945 it was liberated and restored to independence because of its longevity as an independent state - although it would have been easy to unite it to Italy. Before the Euro, San Marino used Italian lire, but minted their own coins more for tourists than for actual use. But the coins certainly were legal tender if you were trying to buy a cappuccino or a pencil.