Siderophile elements are depleted in the Earth's mantle, relative to chondritic meteorites, as a result of equilibration with core-forming Fe-rich metal. Measurements of metal-silicate partition coefficients show that mantle depletions of slightly siderophile elements (e.g. Cr, V) must have occurred at more reducing conditions than those inferred from the current mantle FeO content. This implies that the oxidation state (i.e. FeO content) of the mantle increased with time as accretion proceeded. The oxygen fugacity of the present-day upper mantle is several orders of magnitude higher than the level imposed by equilibrium with core-forming Fe metal. This results from an increase in the Fe2O3 content of the mantle that probably occurred in the first 1Ga of the Earth's history. Here we explore fractionation mechanisms that could have caused mantle FeO and Fe2O3 contents to increase while the oxidation state of accreting material remained constant (homogeneous accretion). Using measured metal-silicate partition coefficients for O and Si, we have modelled core-mantle equilibration in a magma ocean that became progressively deeper as accretion proceeded. The model indicates that the mantle would have become gradually oxidized as a result of Si entering the core. However, the increase in mantle FeO content and oxygen fugacity is limited by the fact that O also partitions into the core at high temperatures, which lowers the FeO content of the mantle. (Mg,Fe)(Al,Si)O3 perovskite, the dominant lower mantle mineral, has a strong affinity for Fe2O3 even in the presence of metallic Fe. As the upper mantle would have been poor in Fe2O3 during core formation, FeO would have disproportionated to produce Fe2O3 (in perovskite) and Fe metal. Loss of some disproportionated Fe metal to the core would have enriched the remaining mantle in Fe2O3 and, if the entire mantle was then homogenized, the oxygen fugacity of the upper mantle would have been raised to its present-day level.