  The dip is a feature in the diffuse spectrum of ultra-high energy (UHE)
protons caused by electron-positron pair production on the cosmic microwave
background (CMB) radiation. For a power-law generation spectrum $E^{-2.7}$, the
calculated position and shape of the dip is confirmed with high accuracy by the
spectra observed by the Akeno-AGASA, HiRes, Yakutsk and Fly's Eye detectors.
When the particle energies, measured in these detectors, are calibrated by the
dip, their fluxes agree with a remarkable accuracy. The predicted shape of the
dip is quite robust. The dip is only modified strongly when the fraction of
nuclei heavier than protons is high at injection, which imposes some
restrictions on the mechanisms of acceleration operating in UHECR sources. The
existence of the dip, confirmed by observations, implies that the transition
from galactic to extragalactic cosmic rays occurs at $E \lsim 1\times 10^{18}$
eV. We show that at energies lower than a characteristic value $E_{\rm
cr}\approx 1\times 10^{18}$ eV, the spectrum of extragalactic cosmic rays
flattens in all cases of interest, and it provides a natural transition to a
steeper galactic cosmic ray spectrum. This transition occurs at some energy
below $E_{\rm cr}$, corresponding to the position of the so-called second knee.
We discuss extensively the constraints on this model imposed by current
knowledge of acceleration processes and sources of UHECR and compare it with
the traditional model of transition at the ankle.
