The Allies managed to stop the German advance on the Western Front and in late July counter-attacked.
In October 1918 the German navy mutinied in Wilhelmshaven and some demoralised soldiers on the Western Front refused to fight.
American soldiers were beginning to arrive in France in substantial numbers from the summer of 1918.
Germany's allies (Bulgaria, Turkey and Austria-Hungary) had all surrendered by early November.
There was starvation and hunger among the German people. Many more were dying in a huge influenza outbreak.
Munich and Berlin were in the hands of revolutionaries who wanted the German government overthrown.
Fresh American soldiers gave great heart to the Allied soldiers fighting against exhausted German troops.
A blockade of German ports by the Royal Navy was preventing food entering Germany and thousands were starving.
The German Emperor, Kaiser Wilhelm II, and his government ministers realised that they had to end the war.
Conditions in Germany were becoming desperate and poor.
So, on 9th November 1918 the German Kaiser stood down to allow his government to surrender.