  The tetragonal-to-orthorhombic phase transition at $T_s$, which precedes the
antiferromagnetic phase transition at $T_N$ in many iron-based superconductors,
is considered as one of the manifestations of electronic \textit{nematic}
order. By constructing temperature-pressure phase diagrams of pure and Co-doped
BaFe$_2$As$_2$, we study the relation of $T_s$ and $T_N$ under pressure $p$.
Our data disclose two qualitatively different regimes in which $\Delta
T\,=\,T_s-T_N$ either increases or decreases with $p$. We provide experimental
evidence that the transition between the two regimes may be associated with
sudden changes of the Fermi surface topology. Therefore, our results not only
support the electronic origin of the structural order, but also emphasize the
importance of details of the Fermi surface for the evolution of nematic order
under pressure.
