Vilhelm Buhl was Prime Minister of Denmark from 4 May 1942 to 9 November 1942 as head of the Unity Government during the German occupation of Denmark of World War II, until the Nazis ordered him removed. He was Prime Minister again from 5 May 1945 to 7 November 1945 as head of a unity government after the liberation of Denmark by the BritishField Marshal Montgomery. Vilhelm Buhl was a member of the Social Democrats, and had held the post of Finance Minister in the cabinets of Thorvald Stauning from 20 July 1937 to 4 May 1942. During Nazi Germany's occupation of Denmark, Thorvald Stauning had created a unity government. When Thorvald Stauning died in May 1942, Vilhelm Buhl succeeded him. This government only lasted six months, because of a diplomatic incident, the Telegram Crisis, in which King Christian X sent a short and formal reply to a long birthday telegram from Adolf Hitler. Hitler was outraged by this insult, and as a result Vilhelm Buhl was replaced by Erik Scavenius. Werner Best was sent to Denmark as a new tough Nazi commander. After the liberation of Denmark on 5 May 1945, the politicians and the resistance fighters formed a unity government. Many Danes were dissatisfied with the politicians because of their policy of cooperation with the Germans that had dominated at the start of the war, hence the inclusion of the resistance fighters. Notable members of the cabinet included Aksel Larsen, Hans Hedtoft, H. C. Hansen, Knud Kristensen and John Christmas Møller. In social policy, the government presided over the passage of the Housing Obligation Act of August 1945, introduced obligatory allocation of vacant housing to ensure that vacant flats were let in the first instance to those with low incomes, while also establishing tight rent controls. The government also presided over the trials of the people who had cooperated with the Germans, as a result of which 45 persons were executed. After the elections in October 1945 Knud Kristensen became the new prime minister.