We propose an algorithm for solving Poisson's equation on general two-dimensional regions with an arbitrary distribution of Dirichlet and Neumann boundary conditions. The algebraic system, generated by the five-point star discretization of the Laplacian, is solved iteratively by repeated direct sparse inversion of an approximating system whose coefficient matrix - the preconditioner - is second-order both in the interior and on the boundary. The present algorithm for mixed boundary value problems generalizes a solver for pure Dirichlet problems (proposed earlier by one of the authors in this journal (1989)) which was found to converge very fast for problems with smooth solutions. The generalized algorithm appears to have similarly advantageous convergence properties, at least in a qualitative sense. © 1992.