  Several pulsar timing array (PTA) collaborations recently announced the first
detection of a stochastic gravitational wave (GW) background, leaving open the
question of its source. We explore the possibility that it originates from
cosmic inflation, a guaranteed source of primordial GW. The inflationary GW
background amplitude is enhanced at PTA scales by a non-standard early
cosmological evolution, driven by Dirac-Born-Infeld (DBI) scalar dynamics
motivated by string theory. The resulting GW energy density has a broken
power-law frequency profile, entering the PTA band with a peak amplitude
consistent with the recent GW detection. After this initial DBI kination epoch,
the dynamics starts a new phase mainly controlled by the scalar potential. It
provides a realization of an early dark energy scenario aimed at relaxing the
$H_0$ tension, and a late dark energy model which explains the current
cosmological acceleration with no need of a cosmological constant. Hence our
mechanism - besides providing a possible explanation for the recent PTA results
- connects them with testable properties of the physics of the dark universe.
