Through June, communists across Bosanska Krajina continued to prepare for an uprising. Ljubo Babić was chosen to be the head of the military committee for Drvar, and Ilija Došen was chosen for Bosanski Petrovac. Axis invasion of the Soviet Union encouraged locals to accelerate preparations. Ustashe authority anticipated rebellion, so reinforcements were brought to the area. The Party advised Drvar workers who were in danger of being arrested to leave Drvar and hide in nearby villages. On 17 July, communists set up the Headquarters of Guerilla Detachments for Bosanski Petrovac with Zdravko Čelar in command, Vaso Kelečević as his deputy and Ilija Došen as the political commissar. The following day, the Headquarters for Drvar was established, with Babić as commander and Milutin Morača as his deputy. Between 20–26 July, the first detachment of fifty men was formed in the village of Kamenica (commander Jole Marić, political commissar Nikola Kotla). In the following days, new detachments were formed in the villages of Javorje (commander Mile Kecman, deputy Slavko Rodić) and Crvljivci (commander Vlado Morača). In Bosansko Grahovo, a detachment was formed, with Simo Bajić as commander. In the village of Trubar, a detachment was formed, with Nikola Rodić as commander and Pero Boltić as commissar. There were also smaller detachments.