Andrić had been Yugoslavia's ambassador to Germany from 1939 to 1941, during the early years of World War II, and was arrested by the Germans in April 1941, following the Axis invasion of Yugoslavia. In June 1941, he was allowed to return to German-occupied Belgrade but was confined to a friend's apartment in conditions that some biographers liken to house arrest. The novel was one of three that Andrić wrote over the next several years.