I was inspired by this comment and wondered when else this had happened in recent history?
Well, there's the rise of fascism in Europe during the 1930s.
The obvious example is the Nazi takeover of Germany. After the fall of the Kaiser in WWI, Germany became a liberal democracy. Historians refer to this period in German history as the "Weimar Republic", after the city in which it was founded. One of the things which made the Holocaust so shocking was that the Nazis had come to power in a society which was impeccably liberal and modern.
While the Nazis were only in power for a relatively short time, about twelve years, their reign was only ended by foreign intervention. Also, other European fascist regimes lasted longer. Spain was a fascist state from the 1930s to the 1970s and the Spanish fascists had also come to power under a liberal republic.