Shiga toxin‐producing Escherichia coli (STEC) can cause diarrhoea and severe diseases in humans, such as haemolytic uraemic syndrome. STEC virulence is considered to correlate with the amount of Shiga toxins (Stx) produced, especially Stx2, whose subtype Stx2a is most frequently associated with high virulence. Stx are encoded in prophages, which play an important role in STEC pathogenesis. The aim of this study was to evaluate stx2a expression levels and Stx2a phage production using qPCR and the double‐agar‐layer method in 29 STEC strains, corresponding to serotypes O26:H11 (6), O91:H21 (1), O145:H‐ (11) and O157:H7 (11), isolated from cattle and humans. Results were then tested for possible associations with serotype, origin or some genetic features. We observed heterogeneous levels of stx2a expression and Stx2a phage production. However, statistical comparisons identified a higher stx2a expression in response to mitomycin C in strains isolated from cattle than in those from humans. At the same time, compared to stx2a/stx2c strains, stx2a strains showed a higher increase in phage production under induced conditions. Notably, most of the strains studied, regardless of serotype and origin, carried inducible Stx2a phages and evidenced expression of stx2a that increased along with phage production levels under induced conditions.