We study the two-loop dilatation operator in the noncompact SL(2) sector of QCD and supersymmetric Yang-Mills theories with N = 1, 2, 4 supercharges. The analysis is performed for Wilson operators built from three quark/gaugino fields of the same helicity belonging to the fundamental/adjoint representation of the SU(3)/SU(N c ) gauge group and involving an arbitrary number of covariant derivatives projected onto the light-cone. To one-loop order, the dilatation operator inherits the conformal symmetry of the classical theory and is given in the multi-color limit by a local Hamiltonian of the Heisenberg magnet with the spin operators being generators of the collinear subgroup of full (super)conformal group. Starting from two loops, the dilatation operator depends on the representation of the gauge group and, in addition, receives corrections stemming from the violation of the conformal symmetry. We compute its eigenspectrum and demonstrate that to two-loop order integrability survives the conformal symmetry breaking in the aforementioned gauge theories, but it is violated in QCD by the contribution of nonplanar diagrams. In SYM theories with extended supersymmetry, the N −dependence of the two-loop dilatation operator can be factorized (modulo an additive normalization constant) into a multiplicative c-number. This property makes the eigenspectrum of the two-loop dilatation operator alike in all gauge theories including the maximally supersymmetric theory. Our analysis suggests that integrability is only tied to the planar limit and it is sensitive neither to conformal symmetry nor supersymmetry.