Abstract. We derive and describe in detail a recently proposed method for obtaining Coulomb interactions as the potential of mean force between charges which are dynamically coupled to a local electromagnetic field. We focus on the Molecular Dynamics version of the method and show that it is intimately related to the CarParrinello approach, while being equivalent to solving Maxwell's equations with freely adjustable speed of light. Unphysical self-energies arise as a result of the lattice interpolation of charges, and are corrected by a subtraction scheme based on the exact lattice Green's function. The method can be straightforwardly parallelized using standard domain decomposition. Some preliminary benchmark results are presented.