In autumn 1918 the allies had clearly won the war. Germany was in a state of chaos. The allies offered Germany peace, but under strict conditions. One condition was that Germany should become more democratic. When the Kaiser refused, sailors in northern Germany mutinied and took over the town of Kiel. This triggered other revolts. The Kaiser's old enemies, the Socialists, led uprisings of workers and soldiers in other German ports. Soon, other German cities followed. In Bararia an independent Socialist Republic was declared. On 9th November 1918 the Kaiser abdicated his throne and left for the Netherlands.
The following day, the Socialist leader Friedrich Ebert became the new leader of the Republic of Germany. He immediately signed an armistice with the allies. The war was over. He also announced to the German people that the new republic was giving them the freedom of speech, freedom of worship and better working conditions. A new constitution was drawn up.
The success of the new government depended on the German people accepting an almost instant change from the traditional, autocratic German system of government to this new democratic system. The prospects for this did not look good.
The reaction of politicians in Germany was unenthusiastic. Ebert had opposition from both right and left. On the right wing, nearly all of the Kaisers former advisers remained in their positions in the army, judiciary, civil service and industry. They restricted what the new government could do. Many still hoped for a return to rule by the Kaiser. A powerful myth developed that men such as Ebert had stabbed Germany in the back and caused the defeat in the war. On the left wing there were many Communists who believed that at this stage what Germany actually needed was a Communist revolution like Russia's in 1917.
Despite this opposition, in January 1919 free elections took place for the first time in Germany's history. Ebert's party won a majority and he became the President of the Weimar Republic.