Primitive Earth had a reducing atmosphere composed of ammonia, methane, hydrogen, carbon dioxide, and nitrogen - but NO free oxygen. Oxygen only appeared later when photosynthetic cyanobacteria evolved and began producing it as a byproduct. This oxygen eventually accumulated to form our current oxygen-rich atmosphere.