We extend the T1 theorem of David and Journé, and the corresponding optimal cancellation conditions of Stein, to pairs of doubling measures, completing the weighted theory begun in [20]. For example, when σ and ω are doubling measures satisfying the classical Muckenhoupt condition, and K λ is a smooth λ-fractional CZ kernel, we show there exists a bounded operator T λ : L 2 ( σ ) → L 2 ( ω ) associated with K λ if and only if there is a positive ‘cancellation’ constant A K λ ( σ , ω ) so that ∫ | x − x 0 | < N | ∫ ε < | x − y | < N K λ ( x , y ) d σ ( y ) | 2 d ω ( x ) ≤ A K λ ( σ , ω ) ∫ | x 0 − y | < N d σ ( y ) , for all 0 < ε < N and x 0 ∈ R n , along with the dual inequality. These ‘cancellation’ conditions measure the classical L 2 norm of integrals of the kernel over shells, and were shown in [20] to be equivalent to the associated T1 conditions, ∫ Q | T λ ( 1 Q σ ) | 2 d ω ≤ T T λ ( σ , ω ) ∫ Q d σ , for all cubes Q , and its dual, for doubling measures in the presence of the classical Muckenhoupt condition on a pair of measures. The cancellation conditions can be taken with respect to either cubes or balls, the latter resulting in a direct extension of Stein's characterization. More generally, this is extended to a weak form of Tb theorem.