In 1944, he was arrested again and sentenced to forced labour for Organisation Todt. However, he was released from duty after only four weeks. Post-war period At the conclusion of the war, Bavaria was occupied by American troops. In June 1945, the new military government appointed Dehler Landrat of the district of Bamberg, which he remained until 1946. He also served in the legal system, as district attorney at the Oberlandesgericht Bamberg (1945/47), as chief prosecutor at the court of cassation at the Bavarian ministry for political liberation (1946/47) and as president of the Oberlandesgericht Bamberg (1947/49). In 1946, Dehler was one of the founding members of the Free Democratic Party (FDP) in Bavaria. Dehler was elected party chairman and remained in that office until 1956. In 1948, when FDP organised on a federal level at its founding convention in Heppenheim, Dehler was elected into the federal board. In 1946, Dehler was a member of the Constituent Assembly of Bavaria. From 1946 to 1949 he was a member of the Bavarian parliament. In 1947/48 he was a member of the Länderrat, a parliamentary body representing the three states in the American zone of occupation. In 1948/49 he was a member of the Parlamentarischer Rat, in which delegates from the states of the American, British and French zones assembled to draw up a constitution for a West German federal state. Dehler was one of three members of the redaction committee. Though Dehler was not completely satisfied with the result - the Basic Law passed on 23 May 1949 - he supported its ratification and harshly criticised any opposition to its ratification in the Bavarian parliament. Federal Minister of Justice In the Federal elections held in August 1949, Dehler was elected into the Bundestag, the new federal parliament. The FDP party formed a coalition with the Christian Democratic Union (CDU), the Christian Social Union (CSU) and the German Party (DP). CDU chairman Konrad Adenauer was elected Federal Chancellor, while FDP chairman Theodor Heuss was elected Federal President. On 20 September, Dehler was one of three FDP politicians to be appointed to Adenauer's cabinet and served as Minister of Justice. As minister, Dehler was mostly concerned with the establishment of a judicial system within a democratic republic. In this context he attempt to limit the independence of the Constitutional Court, which resulted in misgivings between him and Hermann Höpker-Aschoff, a fellow FDP politician