(1) Magmatic, as an early precipitation resulting from the separation of sulfides from mafic to ultramafic melts.
(2) Hydrothermal, by precipitation from metal-bearing fluid phases over a wide temperature range in association with magmatic or metamorphic processes.
(3) Sedimentary-syngenetic, under anoxic conditions through bacterial reduction of sulfate and reaction with dissolved iron in pore waters.
(4) Metamorphic, through the recrystallization of pre-existing sulfides under increasing pressure-temperature conditions (up to the granulite facies).