This study reports on a set of experiments designed to clarify the impact of the rotational transform on confinement quality at the TJ-II stellarator. For this purpose, the net plasma current is controlled using external coils, resulting in the modification of the rotational transform profile. Significant and systematic variations of the edge electron density gradients (up to
$50\,\%{-}60\,\%$) and the plasma energy content (
$20\,\%{-}30\,\%$) are achieved. The explanation of this behaviour relies on the placement of low-order rational surfaces in relation to the edge gradient region, which affect local turbulence fluctuation levels, facilitating the formation of zonal flows and concomitant transport barriers. This hypothesis is confirmed experimentally on the basis of a broad array of diagnostic measurements. Calculations based on a resistive magnetohydrodynamic turbulence model provide qualitative support for this hypothesis, clarifying the impact on confinement of specific rational surfaces and highlighting the complex nature of magnetically confined fusion plasmas.