Idrija’s character as a town on the border was emphasised not only by the barracks overlooking the town, but also by the so-called Alpine Wall fortifications, which had been built on the border in the 1930s to serve as protection from the Kingdom of Yugoslavia. The border was controlled by a special military corps called Guardia alla Frontiera (GAF), which was divided into sectors. The 22nd sector of GAF, the headquarters of which were located in Idrija, covered the areas of Cerkno, Idrija and Črni Vrh. Despite the fact that Yugoslavia had been dismembered, the Rapallo Border remained to be a police, tax, and customs border, with the border fortifications countinuing to be garrisoned. In light of the rising resistance movement, their significance increased.
The fall of Fascism in July of 1943 was followed by the Kingdom of Italy’s capitulation on 8 September. The Italian Civil Service and military also started leaving the mostly-Slovenian areas west of the Rapallo Border. From the surrounding outposts, columns of armed units started gathering in Idrija, and then continued their collective retreat towards Italy’s interior. The small group of the Partisan VOS (Security and Intelligence Service) was unable to disarm the many Italian units on its own. In depots, there still remained large quantities of various materials, which were then made use of by the civilian population as well as by the Partisans.
After the Italians left, a local committee of the Liberation Front (OF) was based on the premisis of the former restaurant Pri črnem orlu in the town square. OF’s proclamations appeared all over the town, while Partisan guards controlled the removal of Italian weapons. Due to German invasions, the Partisans mobilised and established a unit called Idrijski odred with the task of defending the town.
The first German patrol approached Idrija on 10 or 11 September 1943 and killed two locals in Marof. The Germans were unsuccessful in their multiple subsequent attempts to enter Idrija, up until 22 September 1943, when they finally succeeded. The units of the 901st Panzergrenadier regiment were penetrating over Veharše towards Dole, where they separated and continued their way in two columns – one moving towards Kovačev Rovt and the other towards Ledinsko Razpotje. By the morning of 23 September, Idrija was under German control. A small column managed to occupy Črni Vrh on the following day, after which it continued its way towards Ajdovščina. The aforementioned military operations caused a lot of damage to the civilian population of the surrounding villages, especially in Godovič, which was almost completely burnt down.