Jacob C. Horberger has a great article on how Hitler became a dictator in a democracy. A key point came with the Reichstag fire, in which the German capitol building was burned down by a communist terrorist:
"The day after the [Reichstag] fire, Hitler persuaded President Hindenburg to issue a decree entitled, 'For the Protection of the People and the State.' Justified as a “defensive measure against Communist acts of violence endangering the state,” the decree suspended the constitutional guarantees pertaining to civil liberties..."
Specifically Hindenburg (not Hitler) declared that the government could restrcit civil liberties "beyond the legal limits otherwise prescribed." This was the first step to dictatorship, the Reichstag Fire Decree. The second step was the Enabling Act, which destroyed separation of powers by giving the executive branch legislative power. It was only supposed to be temporary, until the government had dealt with the terrorist threat.
This was hardly the only time in history a republic or democracy has been converted by a perceived or actual emergency or war into a dictatorship. The examples are numerous, but perhaps two more major ones suffice: the 1917 October Revolution destroyed the shaky parliamentary government of Kerensky with the dictatorship of Lenin. Dispute over the legal powers of officials and ensuing civil war turned the Roman Republic into the Roman Empire.