San Marino had the world's first democratically elected communist government – a coalition between the Sammarinese Communist Party and the Sammarinese Socialist Party, which held office between 1945 and 1957.