The Magnetic Metallogenic Province of southwestern Spain has a large number of iron mines, in which magnetite and pyrite are the main ores. The largest of these mines, the Cala Mine, is placed in a Lower Cambrian environment, in the contact between a granitic apophysis and limestones. As a result, an important zone of skarn rocks (bearing pyroxene, amphiboles, garnet, epidote, etc.) is formed, and dealing with these rocks are the main stratiform orebodies. There is an old discussion about the origin of the mineral deposits. Some authors believe in a sedimentary genetic type, while others propose a contact-pneumatolitic process, related with the granitic stock. In this paper we try to prove that a primary sedimentary origin is possible for the magnetite. So, we discuss three points: – The environment of the possible deposition, that was a shallow sea, low energy and closed environment, with a high degree of elementary life. – The most probable atmosphere in the Cambrian time, with which the superficial waters would be in equilibrium. – The theoretical, thermodynamical model related with the precipitation of iron ores in this environment. As a conclusion, the simultaneous sedimentation of magnetite and pyrite can be theoretically proved, and the possible variations of temperature, partial pressure of CO2, Eh and pH are also considered. Some interesting considerations about the Precambrian Banded Iron Formations, and their possible origin in an anoxigenic atmosphere are also provided in this paper.