With the occupation of Idrija, the Germans mostly expected to be able to make use of the mercury, which was desperately needed by the German military industry. The town also served as the base of the occupying forces for their many marches towards the Gorenjska region and towards the liberated territories in Cerkno region and in the Trnovski gozd forest, which served as refuge for Partisan military units, hospitals, and printing works. In Idrija, the German units were billeted in civilian buildings, while not making use of the Italian military facilities. Soon after their arrival, the Germans surrounded the whole of Idrija with barbed wire and laid mines in some areas. The area was fortified with about fifteen dug bunkers, where about 200 guards were placed to constantly control all road communications. If the locals wished to leave the barbed-wire circle, they needed a special pass, which was issued by the German command of the town. About one hundred miners who lived outside of the circle also needed to enter the town through the crossings every day.
Despite the German military occupation and the establishment of the so-called Operational Zone of the Adriatic Littoral, the administration of the area of Idrija was still officially under the command of the Italian prefecture in Gorizia. The mine in Idrija remained in possession of the Italian company Monte Amiata, even though it was the Germans who were overseeing the extraction of mercury. Wishing to placate the local population, the German occupator allowed Slovenians to run their municipal administration. In September of 1944, a Home Guard garrison was established in Idrija. The crew assisted the Germans in their police work, while trying to reawaken the Slovenian education system by running an education office. They also published their own newspaper called “Idrijčan”.
Between February and April of 1945, the town suffered ten air raids of the British air forces. The units of the 2nd battalion of the 10th SS Police Regiment and the Home Guard garrison suddenly left the war-torn Idrija on 28 April 1945. The Partisan army took over the town the following day.