We calculate the 10 x 10 two-loop anomalous dimension matrix to order O(alphaalpha(s)) in the dimensional regularization scheme with anticommuting gamma5 (NDR) which is necessary for the extension of the DELTAS = 1 weak hamiltonian involving electroweak penguins beyond the leading logarithmic approximation. We demonstrate how a direct calculation of penguin diagrams involving gamma5 in closed fermion loops can be avoided thus allowing a consistent calculation of two-loop anomalous dimensions in the simplest renormalization scheme with anticommuting gamma5 in D dimensions. We give the necessary one-loop finite terms which allow us to obtain the corresponding two-loop anomalous dimension matrix in the HV scheme with non-anticommuting gamma5.