  Early dark energy (EDE) that behaves like a cosmological constant at early
times (redshifts $z\gtrsim3000$) and then dilutes away like radiation or faster
at later times can solve the Hubble tension. In these models, the sound horizon
at decoupling is reduced resulting in a larger value of the Hubble parameter
$H_0$ inferred from the cosmic microwave background (CMB). We consider two
physical models for this EDE, one involving an oscillating scalar field and
another a slowly-rolling field. We perform a detailed calculation of the
evolution of perturbations in these models. A Markov Chain Monte Carlo search
of the parameter space for the EDE parameters, in conjunction with the standard
cosmological parameters, identifies regions in which $H_0$ inferred from {\it
Planck} CMB data agrees with the SH0ES local measurement. In these cosmologies,
current baryon acoustic oscillation and supernova data are described as
successfully as in \LCDM, while the fit to {\it Planck} data is slightly
improved. Future CMB and large-scale-structure surveys will further probe this
scenario.
