The Soviet Republic finally collapsed following its defeat in the Hungarian–Romanian War, which re-established the Hungarian Republic under a right-wing government and led to a period of anti-communist repression known as the "White Terror", during which thousands of people died. Shortly after the 1920 Hungarian parliamentary election, the Kingdom of Hungary was restored by Miklós Horthy, who ruled the country as regent.