A rigorous theory of the inverse scattering transform for the defocusing nonlinear Schrödinger equation with nonvanishing boundary values inline image as inline image is presented. The direct problem is shown to be well posed for potentials q such that inline image, for which analyticity properties of eigenfunctions and scattering data are established. The inverse scattering problem is formulated and solved both via Marchenko integral equations, and as a Riemann-Hilbert problem in terms of a suitable uniform variable. The asymptotic behavior of the scattering data is determined and shown to ensure the linear system solving the inverse problem is well defined. Finally, the triplet method is developed as a tool to obtain explicit multisoliton solutions by solving the Marchenko integral equation via separation of variables.