  Recent experiments have demonstrated that light can induce a transition from
the quantum paraelectric to the ferroelectric phase of SrTiO$_3$. Here, we
investigate this terahertz field-induced ferroelectric phase transition by
solving the time-dependent lattice Schr\"odinger equation based on
first-principles calculations. We find that ferroelectricity originates from a
light-induced mixing between ground and first excited lattice states in the
quantum paraelectric phase. In agreement with the experimental findings, our
study shows that the non-oscillatory second harmonic generation signal can be
evidence of ferroelectricity in SrTiO$_3$. We reveal the microscopic details of
this exotic phase transition and highlight that this phenomenon is a unique
behavior of the quantum paraelectric phase.
