Whether aftershocks originate directly from the mainshock and surrounding stress environment or from afterslip dynamics is crucial to the understanding of the nature of aftershocks. We build on a classical description of the fault and creeping regions as two blocks connected elastically, subject to different friction laws. We show analytically that, upon introduction of variability in the fault plane’s static friction threshold, a nontrivial stick‐slip dynamics ensues. In particular, we support the hypothesis (Perfettini and Avouac, 2004) that the aftershock occurrence rate is proportional to the afterslip rate, up to a corrective factor that is also computed. Thus, the Omori law originates from the afterslip’s logarithmic evolution in the velocity‐strengthening region. We confirm these analytical results with numerical simulations, generating synthetic catalogs with statistical features in good agreement with instrumental catalogs. In particular, we recover the Gutenberg–Richter law with a realistic ‐value () when Coulomb stress thresholds obey a power‐law distribution.