In 1917, when Germany's situation had gradually worsened due to World War I, the Bavarian Prime Minister Georg von Hertling became German Chancellor and Prime Minister of Prussia and Otto Ritter von Dandl was made new Prime Minister of Bavaria. Accused of showing blind loyalty to Prussia, Ludwig III became increasingly unpopular during the war. In 1918, the kingdom attempted to negotiate a separate peace with the allies but failed. By 1918, civil unrest was spreading across Bavaria and Germany; Bavarian defiance to Prussian hegemony and Bavarian separatism being key motivators.