The Treaty of Versailles
In 1919 following the end of WWI, elements among the victorious powers wanted to ensure Germany was – as they saw it – suitably punished for instigating the devastating conflict.
Among the provisions of the Treaty was a “guilt clause” whereby Germany had to acknowledge fault for starting the war; a limitation of the German army to no more than 100,000 men; financial reparations and the surrender of significant parts of its territory (the Rhineland, the Saar, the Sudetenland, Danzig among them). The overall intent was a punishment that would ensure Germany would be unable to mount a military threat for the foreseeable future.
The Germans delegation thought the treaty was manifestly unfair, but that they had no choice other than to sign. There was significant dissatisfaction and lingering resentment about it from the beginning. There spread in Germany a stab-in-the-back myth that the German army hadn’t lost the war militarily but rather had been betrayed on the home front, especially by the overthrow of the monarchy.
The economy was in ruins and failed to recover for over a decade. Harnessing resentment of the treaty and the conditions it imposed upon the nation, a particularly indignant young Corporal named Adolf Hitler manipulated and lucked his way into power in 1933.
Over the next half decade Hitler incrementally, with growing public support, ignored/eroded the terms of the treaty. Even many who had been initially skeptical of him, and indeed remained so throughout, felt a grudging admiration for the manner in which he restored German dignity and redressed the shame of Versailles – as they saw it. The stab-in-the-back myth helped undermine support for democratic political process and assuaged the process toward ultimate dictatorship.
With every breach of the treaty (up to the invasion of Poland in 1939) Hitler became further entrenched in his initially precarious position ultimately leading to the total war that was World War II, and of course the Holocaust.
So a treaty intended to neuter Germany militarily and bring about a prevailing peace in Europe, played a large part in precipitating the most devastating conflict the world has ever seen, as well as one of the most unimaginable evils ever promulgated by humanity.
As far as unintended consequences go, I would have to say that Versailles should rank pretty high on the list