Germany began to discuss a possible armistice with the Allies near the end of World War I. At the time the German navy was in a mutinous state. When the German High Seas Fleet was ordered to sail to the North Sea for a major battle against the British, the German sailors in Kiel refused to go and took up arms, setting off by their mutiny (October 29-November 3, 1918) an open revolution throughout Germany; only the U-boat (submarine) crews remained loyal to the emperor. Major revolts occurred in Hamburg, Bremen, and Lubeck (November 4-5) and spread to Muich (November 7-8); Bavaria declared itself a democratic and socialist republic. The emperor was forced to abdicate, and on November 11, 1918, the war ended.