Long ranged electrostatic interactions are time consuming to calculate in molecular dynamics and MonteCarlo simulations. We introduce an algorithmic framework for simulating charged particles which modifies the dynamics so as to allow equilibration using a local Hamiltonian. The method introduces an auxiliary field with constrained dynamics so that the equilibrium distribution is determined by the Coulomb interaction. We demonstrate the efficiency of the method by simulating a simple, charged lattice gas. PACS numbers: 71.15.Pd, 07.05.Tp, 61.20.Ja, 72.20.Jv The electrostatic interaction between two point charges in a medium with uniform dielectric constant ǫ 0 varies as e 1 e 2 /4πǫ 0 r. The large numerical value of this energy together with its long range are such that it is very often the most costly component in the simulation of charged condensed matter systems. Naive evaluation of the electrostatic energies in molecular dynamics and Monte-Carlo algorithms leads to inner loops where the summation over all pairs takes a time which scales as O(N 2 ) for a single step in which all N particles are updated.Many methods are used to improve this poor scaling: The optimized Ewald algorithm splits the summation between real and Fourier space and has a complexity of O(N 3/2 ) [1, 2]. By interpolation of the charge distribution onto a grid, fast Fourier transform methods allow a scaling in O(N log(N )) [3]. Finally, a popular method in very large simulations is an expansion of the charge distribution using hierarchical multipoles [4,5]. The asymptotic improvement in efficiency comes, however, with great increases in the complexity of the coding, especially when distributed on multiprocessor computers. The numerical prefactors in these scaling laws are uncomfortably high: Despite the great effort put into optimizing the electrostatic loop, it is found that in the simulation of a large biomolecule (with N ∼ 10 5 ) the great majority of the CPU time is still used in the Coulomb loop [6] in even the most sophisticated numerical codes. Most of these "fast" methods can only be used efficiently in molecular dynamics simulations; there are many occasions where one would like to perform efficient Monte-Carlo simulations due to the stability and simplicity of the method.The classical methods for treating charged systems have another disadvantage, their inability to treat systems with inhomogeneous dielectric constants. Dielectric inhomogeneities have drastic effects on material properties. For instance the dielectric contrast between water and the core of proteins leads to expulsion of counter-ions from a 3A thick hydration layer [7]. To treat charging effects in proteins quite arbitrary, uncontrolled approximations are made [8] on effective electrostatic interactions in the vicinity of a protein in order to reduce interactions to effective pair-wise additive potentials. Similarly much work [9] has been performed on the phase structure of charged synthetic polymers while neglecting the large dielectric contrasts between water...