  We compute the complete O(alphas^2) anomalous dimension matrix relevant for
the b to s gamma, b to s gluon and b to s l+l- transitions in the standard
model and some of its extensions. For radiative decays we confirm the results
of Misiak and Munz, and of Chetyrkin, Misiak and Munz. The O(alphas^2) mixing
of four-quark into semileptonic operators is instead a new result and
represents one of the last missing ingredients of the
next-to-next-to-leading-order analysis of rare semileptonic B meson decays.
