Born in Versec into a Serb family as Dimitrije Stojaković, Sztójay joined the Austro-Hungarian Army as a young man and served as a colonel during World War I. After the war, Sztójay served in Admiral Miklós Horthy’s counter-revolutionary army, specializing in counter-espionage. After Horthy became Regent of Hungary, Sztójay was promoted to general and served as a military attaché in Berlin from 1925 to 1933. He Magyarized his name to Sztójay in 1927. From 1933 to 1935, Sztójay served in the Ministry of Defence. In 1935, Prime MinisterGyula Gömbös named Sztójay as Hungarian ambassador to Germany, a position he would hold until 1944. As ambassador, Sztójay formed strong ties with the Third Reich and often voiced support for German policies to his superiors in Hungary. In Operation Margarethe in March 1944, the German Army occupied Hungary and forced Horthy to remove Prime Minister Miklós Kállay from office. Kállay, like Horthy, knew that Germany was losing the war, and had put out numerous feelers to the West. On 9 September 1943 László Veress, an employee of the Ministry of Exterior signed a secret agreement to surrender unconditionally to the Western Allies. Although Kállay and his government had promised on numerous occasions to surrender to the Western Allies as soon as they reached Hungary, Veress' agreement was unauthorized, as in Kállay's consideration it effectively gave up Hungary's sovereignty. Nevertheless, the agreement didn't sit well with Berlin. When they took over the country, the Germans gave Horthy a choice between choosing a new prime minister who would cooperate with the Germans or undisguised occupation. Knowing that the latter would likely mean a gauleiter who would treat Hungary in the same manner as the other Nazi-occupied countries, Horthy chose the former. The GermanPlenipotentiary for Hungary, Edmund Veesenmayer, proposed that Horthy reappoint Béla Imrédy, who had been prime minister earlier in the war. However, Horthy balked at appointing the strongly pro-German Imrédy and suggested Sztójay instead. Though Sztójay had been ambassador to Berlin for a decade and was known to be pro-German, Horthy believed that at bottom he was a soldier first and would not totally give in to German demands. The Germans readily approved of Horthy's choice, and on 23 March 1944, Sztójay was appointed Prime Minister and Minister of Foreign Affairs. As prime minister, Sztójay legalized Ferenc Szálasi’s Arrow Cross Party, increased Hungarian troop levels on the Eastern Front, dissolved the nation's labor unions, jailed political opponents, and cracked down on left wing politicians and activists. He also significantly ramped up the pace of forced deportations of Hungarian Jews, but at the same time tried to reduce the consequences. Horthy quickly became appalled by Sztójay's actions and demanded his removal as prime minister, but Veesenmayer, backed by Adolf Hitler, sternly refused to do so. Horthy refused to give in entirely, however, and used his influence to stop the deportations of Hungary's Jews and to force Imrédy out of Sztójay's cabinet. The Germans finally submitted to Horthy's pressure in August 1944 and Sztójay resigned as prime minister in favour of Géza Lakatos. When Horthy was removed from power by the Germans in October 1944, Sztójay was not reappointed prime minister due to poor health. Sztójay subsequently fled Hungary when the Germans were driven out of the country by the Red Army in April 1945. Sztójay was later captured by American troops and extradited to Hungary in October 1945, after which time he was tried by a People's Tribunal in Budapest. He was found guilty of war crimes and crimes against the Hungarian people, sentenced to death, and executed by a firing squad in Budapest in 1946.