After Nazi Germany's attack on the Soviet Union he was imprisoned in a German work camp in Tarnopol (now Ternopil), from which he made several attempts to escape. He received a death sentence for his second attempt to escape, but managed to successfully escape in 1943. In his autobiography he described his escape as having taken place after he killed his guard with a shovel when taken to dig his own grave. This became the subject of one of his most famous poems "He who had dug his own grave" (from the cycle "To Abel and Cain"):