A fundamental result of classical electromagnetism is that Maxwell's equations imply that electric charge is locally conserved. Here we show the converse: Local charge conservation implies the local existence of fields satisfying Maxwell's equations. This holds true for any conserved quantity satisfying a continuity equation. It is obtained by means of a strong form of the Poincaré lemma presented here that states: Divergence-free multivector fields locally possess curl-free antiderivatives on flat manifolds. The above converse is an application of this lemma in the case of divergence-free vector fields in spacetime. We also provide conditions under which the result generalizes to curved manifolds.