  We present the results of the first lattice QCD calculation of the $K \to
\pi$ matrix elements of the chromomagnetic operator $O_{CM} = g\, \bar s\,
\sigma_{\mu\nu} G_{\mu\nu} d$, which appears in the effective Hamiltonian
describing $\Delta S = 1$ transitions in and beyond the Standard Model. Having
dimension 5, the chromomagnetic operator is characterized by a rich pattern of
mixing with operators of equal and lower dimensionality. The multiplicative
renormalization factor as well as the mixing coefficients with the operators of
equal dimension have been computed at one loop in perturbation theory. The
power divergent coefficients controlling the mixing with operators of lower
dimension have been determined non-perturbatively, by imposing suitable
subtraction conditions. The numerical simulations have been carried out using
the gauge field configurations produced by the European Twisted Mass
Collaboration with $N_f = 2+1+1$ dynamical quarks at three values of the
lattice spacing. Our result for the B-parameter of the chromomagnetic operator
at the physical pion and kaon point is $B_{CMO}^{K \pi} = 0.273 ~ (70)$, while
in the SU(3) chiral limit we obtain $B_{CMO} = 0.072 ~ (22)$. Our findings are
significantly smaller than the model-dependent estimate $B_{CMO} \sim 1 - 4$,
currently used in phenomenological analyses, and improve the uncertainty on
this important phenomenological quantity.
