In response to Danish resistance, the Danish-German Agreement of 1940 was revoked. A year earlier, the Germans had changed their policy of relative non-interference with the Danes and had appointed Karl Werner Best, a former legal adviser to the Gestapo, as the Reich's representative in Denmark. Martial law was now imposed under General von Hannecken and the Danish Parliament dissolved. This also gave Best the opportunity to begin preparations for deportations. Best was sentenced to death by Copenhagen courts in 1946 but after an appeal, his sentenced was reduced and he was freed in 1951.