In August 1939, Hitler's government negotiated the Molotov–Ribbentrop pact that divided Eastern Europe into German and Soviet spheres of influence. On 1 September 1939, Germany invaded Poland, beginning World War II in Europe; Britain and France declared war on Germany on 3 September. In the spring of 1940, Germany conquered Denmark and Norway, the Netherlands, Belgium, Luxembourg, and France, forcing the French government to sign an armistice. The British repelled German air attacks in the Battle of Britain in the same year. In 1941, German troops invaded Yugoslavia, Greece and the Soviet Union. By 1942, Germany and its allies controlled most of continental Europe and North Africa, but following the Soviet victory at the Battle of Stalingrad, the allies' reconquest of North Africa and invasion of Italy in 1943, German forces suffered repeated military defeats. In 1944, the Soviets pushed into Eastern Europe; the Western allies landed in France and entered Germany despite a final German counteroffensive. Following Hitler's suicide during the Battle of Berlin, Germany surrendered on 8 May 1945, ending World War II in Europe. Following the end of the war, surviving Nazi officials were tried for war crimes at the Nuremberg trials.