Of all medical sciences in Slovenia, occupational medicine has one of the longest traditions. It is not a mere coincidence that began to develop in Idrija as early as the beginning of the 18th century. The Idrija mercury mine, the second largest mine of the world after Almaden in Spain, was owned by the Habsburg dynasty for four centuries. The working capacity of the Idrija miners was greatly reduced by chronic poisoning with mercury, and in order to attain higher production of the mine, medical and social care for miners was provided in Idrija much earlier than anywhere else. The first, and one of the most prominent doctors in Idrija, dr. J. A. Scopoli described in exhaustive detail the symptoms of chronic intoxication with mercury in his work De Hydrargyro Idriensi Tentamina Physico-Chymico-Medica and thus took his place among the pioneer authors of works on occupational medicine, hygiene and toxicology. His predecessors were Ellenbog, Paracelsus, Mattioli and some others. The paper describes the situation in the Idrija mine in the 17th and 18th century, focusing on the Scopoli’s mineralogical and medical discussion on mercury miners and mercurialism.