After four years of war on multiple fronts in Europe and around the world, the Allied offensive began in August 1918, and the position of Germany and the Central Powers deteriorated, leading them to sue for peace. Initial offers were rejected by the Allied Powers, and Germany's position became more desperate. Awareness of impending military defeat sparked the German Revolution, proclamation of a republic on 9 November 1918, the abdication of Kaiser Wilhelm II, and German surrender, marking the end of Imperial Germany and the beginning of the Weimar Republic.