The oxygen/silver system exhibits unique catalytic behavior for several large-scale oxidation (and partial oxidation) industrial processes. In spite of its importance, very little is known on the microscopic level concerning the atomic geometry and chemical nature of the various O species that form. Using density-functional theory within the generalized gradient approximation, the interaction between atomic oxygen and the Ag(111) surface is investigated. We consider. for a wide range of coverages. on-surface adsorption as well as surface-substitutional adsorption. The on-surface fcc-hollow site is energetically preferred for the whole coverage range considered. A significant repulsive interaction between adatoms is identified, and on-surface adsorption becomes energetically unstable for coverages greater than about 0.5 monolayer (ML) with respect to gas-phase O-2 The notable repulsion even at these lower coverages causes O to adsorb in subsurface sites for coverages greater than about 0.25 ML. The O-Ag interaction results in the formation of bonding and antibonding states between Ag 4d and O 2p orbitals where the antibonding states are largely occupied, explaining the found relatively weak adsorption energy. Surface-substitutional adsorption initially exhibits a repulsive interaction between O atoms, but for higher coverages switches to attractive, towards a (root3 x root3)R30degrees structure. Scanning tunneling microscopy simulations for this latter structure show good agreement with those obtained from experiment after high-temperature and high-O-2-gas-pressure treatments. We also discuss the effect of strain and the found marked dependence of the adsorption energy on it, which is different for different kinds of sites.