By early 1944, with Soviet forces fast advancing from the east, Hungary was caught attempting to contact the British and the Americans to secretly escape the war and establish an armistice with the Allies. On 19 March 1944, the Germans responded by invading Hungary in Operation Margarethe. German forces occupied key locations to ensure Hungarian loyalty. They placed Horthy under house arrest and replaced Prime Minister Miklós Kállay with a more pliable successor. Döme Sztójay, an avid supporter of the Nazis, became the new Hungarian Prime Minister. Sztójay governed with the aid of a Nazi military governor, Edmund Veesenmayer.