  We compute the order alpha_s^2 correction to the matrix element of magnetic
penguin operator for B meson decaying to light mesons within the QCD
factorization framework. We explicitly show that the soft and collinear
divergences are canceled out, so that the validity of QCD factorization is
confirmed. We present the result of the calculation in complete analytic forms.
The result is also applied to B -> K pi decays, and we find that the order
alpha_s^2 correction of magnetic penguin operator can considerably reduce the
coefficient of penguin amplitude a^c_{4,I}. The reduction is stronger for the
imaginary part.
