He later became Croatian envoy to Nazi Germany (November 1941 – April 1943) and foreign minister (May 1943 – November 1943). When the Independent State of Croatia collapsed, Budak was captured by British military authorities and handed over to Tito's Partisans on 18 May 1945. He was court-martialled (before the military court of the 2nd Yugoslav army) in Zagreb on 6 June 1945 and was sentenced to death by hanging the same day. His execution the following day took place exactly 13 years after the assassination attempt on his life. During the trial, Budak was described to behave "cowardly, constantly weeping, and claiming he was not guilty of anything".