  We explore the possibility that a confining first-order phase transition of a
nearly-conformal dark sector generates the reported NANOGrav signal of a
stochastic gravitational wave background. The visible Standard Model (SM)
sector and the dark sector are initially thermally decoupled so that their
temperatures are different. The nearly conformal phase transition is described
by the shallow potential of a dilaton (or a radion in the 5D holographic
perspective) generated by a new dark Yang-Mills field coupled to the conformal
sector. For a dark sector only gravitationally connected with the visible
sector, the NANOGrav signal is explained by the phase transition without
contradicting the $\Delta N_{\rm eff}$ constraint, together with a contribution
from supermassive black hole binaries. While the dilaton and dark glueballs can
be produced after the phase transition, they immediately decay into dark
radiation, which can help ameliorate the Hubble tension and be tested by the
future CMB-S4 experiment. Alternatively, for a dark conformal sector decaying
into the visible sector after the phase transition, the $\Delta N_{\rm eff}$
constraint is not applied and the phase transition can solely explain the
NANOGrav signal.
