We present a model for a one-dimensional anisotropic exclusion process describing particles moving deterministically on a ring of lengthL with a single defect, across which they move with probability 0 ⩽p ⩽ 1. This model is equivalent to a two-dimensional, six-vertex model in an extreme anisotropic limit with a defect line interpolating between open and periodic boundary conditions. We solve this model with a Bethe ansatz generalized to this kind of boundary condition. We discuss in detail the steady state and derive exact expressions for the currentj, the density profilen(x), and the two-point density correlation function. In the thermodynamic limitL → ∞ the phase diagram shows three phases, a low-density phase, a coexistence phase, and a high-density phase related to the low-density phase by a particle-hole symmetry. In the low-density phase the density profile decays exponentially with the distance from the boundary to its bulk value on a length scale ξ. On the phase transition line ξ diverges and the currentj approaches its critical valuejc = p as a power law,jc − j ∞ ξ−1/2. In the coexistence phase the widthδ of the interface between the high-density region and the low-density region is proportional toL1/2 if the densityρf 1/2 andδ=0 independent ofL ifρ = 1/2. The (connected) two-point correlation function turns out to be of a scaling form with a space-dependent amplitude n(x1, x2) =A(x2)AKe−r/ξ withr = x2 −x1 and a critical exponent κ = 0.