Great Oxygenation Event
The evidence is that free oxygen was first produced by photosynthetic organisms (prokaryotic, later eukaryotic) which emitted oxygen as a waste product. These organisms lived long before the GOE, perhaps 3500 million years ago (mya). The oxygen they made would have quickly been removed from the atmosphere by the 'mass rusting' which led to the deposition of banded-iron formations. Oxygen only began to continue in the atmosphere in small quantities shortly (~50 million years) before the start of the GOE. Without a draw-down, oxygen would come to the atmosphere and stay there very quickly. At today's rates of photosynthesis (which are much greater than those in the land-plant-free Precambrian), modern atmospheric O2 levels could be produced in around 2,000 years.