Upper-plate aftershocks following megathrust earthquakes are particularly dangerous as they may occur close to the highly populated shore. Aftershock numbers decay with time, imposing a time-dependent seismic hazard. While coseismic stress transfer cannot explain this time-dependency, transient postseismic deformation due to afterslip, viscoelastic relaxation, and pore-pressure diffusion are potential candidates. We investigate which of these three processes is the key driver of the upper-plate aftershocks following the 2014 Mw=8.1 Iquique, northern Chile, earthquake. We first use a 4D (space and time) model to reproduce the postseismic deformation observed in geodetic data. We then analyze the spatiotemporal stress changes produced by individual postseismic processes and compare them to the distribution of upper-plate aftershocks. Our results reveal that stresses produced by coseismically-induced pore-pressure diffusion best correlate in space and time with increased upper-plate aftershock activity. Moreover, an increase in pore-pressure diffusion reduces the three principal stresses likewise. Hence, all faults, regardless of their orientation, are brought closer to failure. This may explain the diversity of faulting styles of upper-plate aftershocks. Our findings provide new insights into the link between pore-pressure diffusion and upper-plate deformation in subduction zones with implications for time-dependent seismic hazard assessment.