We obtain a description of the Poincaré recurrences of chaotic systems in terms of the ergodic theory of transient chaos. It is based on the equivalence between the recurrence time distribution and an escape time distribution obtained by leaking the system and taking a special initial ensemble. This ensemble is atypical in terms of the natural measure of the leaked system, the conditionally invariant measure. Accordingly, for general initial ensembles, the average recurrence and escape times are different. However, we show that the decay rate of these distributions is always the same. Our results remain valid for Hamiltonian systems with mixed phase space and validate a split of the chaotic saddle in hyperbolic and nonhyperbolic components.