The Third French Republic had begun the war in September 1939 on the side of the Allies. On 10 May 1940, it was invaded by Nazi Germany. The Nazis rapidly broke through the Allied lines by bypassing the highly-fortified Maginot Line and invading through Belgium. By mid-June, the military situation of the French was dire, and it was apparent that the battle for Metropolitan France could not be won. The French government began to discuss the possibility of an armistice. Paul Reynaud resigned as prime minister, rather than sign an armistice, and was replaced by Marshal Philippe Pétain, a hero of World War I. Shortly thereafter, Pétain signed the Armistice of 22 June 1940. On 10 July, the Third Republic was effectively dissolved as Pétain was granted dictatorial powers by the National Assembly.