In this paper, we present a novel semi-classical theory of the electrostatic and magnetostatic fields and explain the nonlocality problem in the context of the Aharonov-Bohm effect [1]. Specifically, we show that the electrostatic and the magnetostatic fields possess a quantum nature that manifests if certain conditions are met. In particular, the wave amplitudes of the fields are seen to exist even in the regions where the classical fields vanish and they operate on the electron wave functions locally as unitary phases. This formulation also sheds light on the quantisation of electric charges and magnetic flux.