The inverse Omori law for foreshocks discovered in the 1970s states that the rate of earthquakes prior to a mainshock increases on average as a power law ∝ 1/(t c − t) p ′ of the time to the mainshock occurring at t c . Here, we show that this law results from the direct Omori law for aftershocks describing the power law decay ∼ 1/(t − t c ) p of seismicity after an earthquake, provided that any earthquake can trigger its suit of aftershocks. In this picture, the seismic activity at any time is the sum of the spontaneous tectonic loading and of the activity triggered by all preceding events weighted by their corresponding Omori law. The inverse Omori law then emerges as the expected (in a statistical sense) trajectory of seismicity, conditioned on the fact that it leads to the burst of seismic activity accompanying the mainshock. In particular, we predict and verify by numerical simulations on the Epidemic-Type-Aftershock Sequence (ETAS) model that p ′ is always smaller than or equal to p and a function of p, of the b-value of the Gutenberg-Richter law (GR) and of a parameter quantifying the number of direct aftershocks as a function of the magnitude of the mainshock. The often documented apparent decrease of the b-value of the GR law at the approach to the main shock results straightforwardly from the conditioning of the path of seismic activity culminating at the mainshock. However, we predict that the GR law is not modified simply by a change of b-value but that a more accurate statement is that the GR law gets an additive (or deviatoric) power law contribution with exponent smaller than b and with an amplitude growing as a power law of the time to the mainshock. In the space domain, we predict that the phenomenon of aftershock diffusion must have its mirror process reflected into an inward migration of foreshocks towards the mainshock. In this model, foreshock sequences are special aftershock sequences which are modified by the condition to end up in a burst of seismicity associated with the mainshock. Foreshocks are not 2 just statistical creatures, they are genuine forerunners of large shocks as shown by the large prediction gains obtained using several of their qualifiers.