In World War I, Germany joined Austria-Hungary, and again declared war on France. The war became slow in the west and became trench warfare. Many men were killed on both sides without winning or losing. In the Eastern Front the soldiers fought with the Russian Empire and won there after the Russians gave up. The war ended in 1918 because the Germans could not win in the west and gave up. Germany's emperor also had to give up his power, and most of Germany's African colonies were taken by other European empires. France took Alsace from Germany and Poland got the Danzig corridor. After a revolution, the Second Reich ended, and the democratic Weimar Republic began.