  We study first order phase transitions in Randall-Sundrum models in the early
universe dual to confinement in large-$N$ gauge theories. The transition rate
to the confined phase is suppressed by a factor $\exp(-N^2)$, and may not
complete for $N \gg 1$, instead leading to an eternally inflating phase. To
avoid this fate, the resulting constraint on $N$ makes the RS effective field
theory only marginally under control. We present a mechanism where the IR brane
remains stabilized at very high temperature, so that the theory stays in the
confined phase at all times after inflation and reheating. We call this
mechanism avoided deconfinement. The mechanism involves adding new scalar
fields on the IR brane which provide a stablilizing contribution to the radion
potential at finite temperature, in a spirit similar to Weinberg's symmetry
non-restoration mechanism. Avoided deconfinement allows for a viable cosmology
for theories with parametrically large $N$. Early universe cosmological
phenomena such as WIMP freeze-out, axion abundance, baryogenesis, phase
transitions, and gravitational wave signatures are qualitatively modified.
