  We prove that for renormalizable Yang-Mills gauge theory with arbitrary compact gauge group (of at most a single abelian factor) and matter coupling, the absence of gauge anomalies can be established at the one-loop level. This proceeds by relating the gauge anomaly to perturbative agreement, which formalizes background independence. 
Background independence and the Adler-Bardeen theorem