During the Second World War, in 1940, San Marino were bombed by the Allied Forces (ordered by the United Kingdom) over false speculations that the Sammarinese government were harbouring German weaponry after being overrun by their forces. Thirty-five people were killed in the bombings and soon after, San Marino demanded an apology from the British Government. The British Government refused and a great tension was made for around 2-4 months.
Soon after, San Marino demand again another apology and threaten the British with a union with the Axis powers which made little effect on the British affairs. They did not feel that San Marino would actually act on their threaten and break their neutral status. Contrary to their thoughts, however, they did (on special terms) unite with the Axis Powers. This caused great shock as Britain had also started sending in military troops as a result of the tensions due to the sanctions.
Sammarinese forces formed a blockade, assisted by the Italian forces along the northern and north-eastern borders of San Marino, stopping the British forces from entering. The Italian forces then felt confident that they had ran off the British forces and so, left the much smaller Sammarinese forces to guard their borders. Soon after, the British marched in in 1942 and easily bypassed the defensive mechanisms put in place. The Italian's, not wanting to leave their occupancy of Vichy France and Corsica, denied requests from San Marino for military help and San Marino was effectively obliterated.
Whilst the United Kingdom could easily have claimed San Marino as their own, having controlled most of the area around it, it was deemed too risky to guard a landlocked country in the middle of a key Axis country. It could be considered a waste of military forces. San Marino was then left in tatters but now, the Italian Government offered aid to the microstate and in return, they could now use the coutry for military routings. The Sammarinese government quickly agreed to the terms and opened their previously closed borders to the Italian military only. However, this was a secret agreement and no otfher countries knew about this.