To help provide insight into the remarkable catalytic behavior of the oxygen/silver system for heterogeneous oxidation reactions, purely subsurface oxygen, and structures involving both on-surface and subsurface oxygen, as well as oxidelike structures at the Ag(111) surface have been studied for a wide range of coverages and adsorption sites using density-functional theory. Adsorption on the surface in fcc sites is energetically favorable for low coverages, while for higher coverage a thin surface-oxide structure is energetically favorable. This structure has been proposed to correspond to the experimentally observed $(4\ifmmode\times\else\texttimes\fi{}4)$ phase. With increasing O concentrations, thicker oxidelike structures resembling compressed ${\mathrm{Ag}}_{2}\mathrm{O}(111)$ surfaces are energetically favored. Due to the relatively low thermal stability of these structures, and the very low sticking probability of ${\mathrm{O}}_{2}$ at Ag(111), their formation and observation may require the use of atomic oxygen (or ozone, ${\mathrm{O}}_{3})$ and low temperatures. We also investigate the diffusion of O into the subsurface region at low coverage (0.11 ML), and the effect of surface Ag vacancies in the adsorption of atomic oxygen and ozonelike species. The present studies, together with our earlier investigations of on-surface and surface-substitutional adsorption, provide a comprehensive picture of the behavior and chemical nature of the interaction of oxygen and Ag(111), as well as of the initial stages of oxide formation.