In this paper, we demonstrate that the formation of photonic nanojets is the result of near-field diffraction. We show that the photonic nanojet is the central bright maxima in the field intensity distribution as a consequence of diffraction triggered by a virtual slit comprising a micro-scale dielectric surface. Details on the role of the opto-geometric environment in reshaping the photonic nanojet are provided. Based on this new understanding, we propose a new structured optical fiber end-face that produces a photonic nanojet in a wide range of environments.