Arsenic (As) and gold (Au) are closely associated in many gold deposits, both being hosted in Fe-sulfide minerals (pyrite, marcasite, and arsenopyrite), partly because As geochemistry controls Au accumulation. Yet, the partitioning behavior of As between pyrite, arsenopyrite, and hydrothermal fluids remains poorly understood. Here, we introduce solid-solution models for As in pyrite and As in arsenopyrite into a thermochemical model of fluid-rock interaction, and use it to evaluate the effects of temperature, redox state, and fluid-flow dynamics on As-and Au by association-partitioning. We find that As concentrations in pyrite decrease with increasing temperature, despite the widening of the solid-solution composition range. This is related to the preferential partitioning of As into fluids at higher temperatures. Simulations of infiltration of rock-buffered H 2 O-CO 2 -As fluids into low-As pyrite (As:S = 0.01) ores reveal a continuous enrichment of As in pyrite with increasing fluid:rock ratio. The modeling suggests that upgrading of early-formed low-grade ores by multistage hydrothermal events can generate large gold deposits. In this scenario, an anomalously Au-rich fluid is not needed, but instead, prolonged fluid-rock interaction enriches pyrite in As, which promotes gold sequestration.